Reputation: 902
In Solr ,I have a field called Code_string and it have a values like S102.103.111_1, S102.103.111_2
when I search with "S102.103.111" .it's returning me the zero results.
Any inputs on it?
Upvotes: 0
Views: 104
Reputation: 4010
As Nikolay said, String type fields are not analyze by default. But text_general type fields will be analyze. You can just change your field name into Code_string_txt then it will be searchable. Otherwise, define your custom field in conf/schema.xml like this
<field name="Code_string" type="text_general" indexed="true" stored="true" multiValued="true"/>
Upvotes: 2
Reputation: 1959
String type fields aren't analyzed by default. (Assumes you use StrField
, also check Solr documentation: Field Types Included with Solr)
So you need either use a wildcard query: S102.103.111*
or define your own field type with custom analyzer (Look at Understanding Analyzers, Tokenizers, and Filters).
Upvotes: 1