I am having difficulties performing a search using Solr on certain fields. I am using Solarium as the “bridge” between the PHP code and the Apache Solr Search Server.
When I perform a search on “product_name” it returns successfully, however if I search on style_colour or style_number it does not. I have made both fields “indexed” in the schema, which, AFAIK, makes them searchable.
Can anyone advise what i’m doing wrong here?
Schema:
<field name="product_name" type="text_general" indexed="true" stored="true"/>
<field name="style_colour" type="string" indexed="true" stored="true"/>
<field name="style_number" type="string" indexed="true" stored="true"/>
Result from a Solr Admin “get me everything” query:
<result name="response" numFound="1071" start="0">
<doc>
<str name="product_name">Farls</str>
<str name="style_colour">01701901701931</str>
<str name="style_number">017019</str>
</doc>
...
Add following in your schema –
Also, make sure the field text is defined in your schema.
Would need to re-index your data again.
Using the standard request handler, your query would search the three fields.