Solr Query for Multiple value data

147 views Asked by At

I want to search data in multiple category,

Steps -

  1. If I search a keyword on my website it will show results that matches on all category.
  2. Then I will choose multiple category filter from which categories results I want.

My Solr query as below which is not showing any results when I click on multicheckbox.

How to query on solr with multiple value ?

I have checked Function Query and Logical operators as well but nothing seems to be working now.

Query Example 1 -

http://localhost:8983/solr/shop_core/select?indent=on&q=(title_search_t:*hunter*+OR+description_t:*hunter*)+AND+((fq=parent_category_i:(2103+OR+2105)+OR+fq=child_1_category_i:(2103+OR+2105))+OR+(fq=parent_category_i:(2103+OR+2105)+OR+fq=child_2_category_i:(2103+OR+2105))+OR+(fq=parent_category_i:(2103+OR+2105)+OR+fq=child_3_category_i:(2103+OR+2105)))&wt=json&sort=qty_d+DESC+&sort=is_in_stock_i+DESC+&sort=id+ASC&rows=10000

Query Example 2-

http://localhost:8983/solr/shop_core/select?indent=on&q=(title_search_t:*hunter*+OR+description_t:*hunter*)
+AND+(parent_category_i:(2110+AND+2105)+OR+child_1_category_i:(2110+AND+2105))+OR+(parent_category_i:(2110+AND+2105)+OR+child_2_category_i:(2110+AND+2105))+OR+(parent_category_i:(2110+AND+2105)+OR+child_3_category_i:(2110+AND+2105))&wt=json&sort=qty_d+DESC+&sort=is_in_stock_i+DESC+&sort=id+ASC&rows=10000

Any help would be appreciated.

0

There are 0 answers