I have issues using SOLR to search. My schema is defined as following:
<field name="_root_" type="string" indexed="true" stored="false"/>
<field name="_text_" type="text_general" multiValued="true" indexed="true" stored="true"/>
<field name="_version_" type="long" indexed="true" stored="true"/>
<field name="deleted" type="booleans" indexed="true" stored="true"/>
<field name="description" type="strings" indexed="true" stored="true"/>
<field name="favorites_count" type="tlongs"/>
<field name="id" type="string" multiValued="false" indexed="true" required="true" stored="true"/>
<field name="image" type="strings"/>
<field name="ingredients" type="strings" multiValued="true" indexed="true" stored="true"/>
<field name="level" type="tlongs"/>
<field name="portions" type="tlongs" indexed="true" required="true" stored="true"/>
<field name="preparation" type="strings"/>
<field name="rating" type="tdoubles"/>
<field name="ratings_count" type="tlongs"/>
<field name="subject" type="strings" indexed="true" required="true" stored="true"/>
<field name="visible" type="booleans" indexed="true" stored="true"/>
The issue is when I try to perform searching on the "ingredients" field.
Main query:
q=(subject:"phrase search input" OR description:"phrase search input") AND ingredients:("some ingredients phrase")
or ingredients:searchWord
The query without the ingredients parameter works just fine, with correct results output.
However, when it comes to filter on ingredients, no matter I am using fq or directly in the query string, I am getting wrong or no results at all.
The ingredients field has data as following:
ingredients:[ ingredient 1, ingredient 2, ingredient 3 phrase ]
The other issue is when the ingredient has "(" or ")" characters and I am searching such a phrase -- can't match.
SOLR version: 5.3
Does anybody can help me on this?
Thank you!