【问题标题】:Shopizer Search购物者搜索
【发布时间】:2015-01-23 04:34:49
【问题描述】:

我正在设置shopizer并在tomcat服务器上部署sm-shop.war即预打包的war文件

根据http://www.shopizer.com/documentation.html#!/,我需要编辑 sm-core/src/main/resources/spring/shopizer-search.xml 并确保模式是本地的

 <property name="mode" value="local"/>

但是,我没有在我的 webapps 下看到相应的文件。

我尝试将此 search.xml 复制到 /apache-tomcat-7.0.56/webapps/sm-shop/WEB-INF/spring 并重新启动。但是,搜索仍然不起作用。总是返回 0 个结果

日志显示以下错误

at java.lang.Thread.run(Thread.java:745) ERROR: com.salesmanager.web.shop.controller.search.SearchController - Exception occured while querying {"query":{"query_string" : {"fields" : ["name^3", "description", "tags"], "query" : "*mysearch*", "use_dis_max" : true }},"facets" : { "categories" : { "terms" : {"field" : "categories"}}}}
org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select category
from com.salesmanager.core.business.catalog.category.model.Category category   left join fetch category.descriptions as categoryDescription   left join fetch category.merchantStore where category.code in () and category.merchantStore.id = :a2 and categoryDescription.language.id = :a2 order by category.sortOrder asc, category.lineage asc, category.lineage asc, category.depth asc, categoryDescription.language.id desc]; nested exception is java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [select category from com.salesmanager.core.business.catalog.category.model.Category category   left join fetch category.descriptions as categoryDescription   left join fetch category.merchantStore

【问题讨论】:

  • 这些说明适用于您使用源文件版本构建 shopizer。您能否更具体地说明您要实现的目标,以防您正在寻找搜索索引,何时创建产品管理部分,它会自动用 ES 索引
  • 非常感谢 Umesh。目前,产品使用 shopizer-properties.xml 填充测试数据,但是,我无法搜索所有这些产品。它返回“0 项找到消息”
  • 在管理面板中尝试编辑一些产品,您将能够看到搜索结果。这是因为ES实例在产品加载到系统后进入图片。
  • 非常感谢,Umesh。它符合您的建议!!!

标签: java spring search shopizer


【解决方案1】:

关于弹性搜索,文件将位于工作目录中。因此,如果您从 Eclipse 运行,是的,将会有一个包含索引的 shopizer 文件夹。例如,如果您直接从 Tomcat 进行部署,则必须找出磁盘上的容器工作目录,这是您可以找到索引的地方。在您的情况下,搜索配置似乎是 ik

现在您遇到的异常似乎与错误的类别配置有关,您可能需要修改您的结构。我建议你从一个类别和一个产品开始,尝试从那里搜索和掌握这个概念

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-13
    • 1970-01-01
    相关资源
    最近更新 更多