Shopizer Search

733 views Asked by At

Am setting up shopizer and Deploying sm-shop.war ie pre-packaged war file on tomcat server

as per http://www.shopizer.com/documentation.html#!/, i need to edit sm-core/src/main/resources/spring/shopizer-search.xml and make sure the mode is local

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

however, I do not see respective file under my webapps.

I tried to copy this search.xml to /apache-tomcat-7.0.56/webapps/sm-shop/WEB-INF/spring and restarted. However, still search is not working. always it returns 0 results

Logs shows following error

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
1

There are 1 answers

0
Carl Samson On

With regards to elastic search the files will be in the working derectory. So if you are running from eclipse yes there will be a shopizer folder that contains indexes. If you are for instance deploying from Tomcat directly, you will have to figure out the container working directory on your disk, thet's where you will find your indexes. It seems that in your case search configuration is ik

Now the exception you are getting seems to be related with a bad category configuration, you may want to revise your structure. I would suggest that you start with one category and a product, try to search and grasp the concept from there