【发布时间】: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