search - Solr query that contains slash -
i've found interesting query solr , returns search results, don't understand, purpose of slash symbol between words?
duties:health/nurse
anybody knows? please, help.
simple. can @ analyzer chain understand happens. guess analyzer chain turns / space - makes query
duties: health nurse
to find out analyzer chain configuration - start checking type of field
for example
<field name="health" type="text_general" indexed="true" stored="true" required="true"/>
now definition of type
<fieldtype name="text_general" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" /> <!-- in example, use synonyms @ query time <filter class="solr.synonymfilterfactory" synonyms="index_synonyms.txt" ignorecase="true" expand="false"/> --> <filter class="solr.lowercasefilterfactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.standardtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" /> <filter class="solr.synonymfilterfactory" synonyms="synonyms.txt" ignorecase="true" expand="true"/> <filter class="solr.lowercasefilterfactory"/> </analyzer> </fieldtype>
as can see, have index analyzer , query analyzer.
my query analyzer turn / in query else using standardtokenizerfactory.
from solr wiki:
solr.standardtokenizerfactory
a general purpose tokenizer strips many extraneous characters , sets token types meaningful values. token types useful subsequent token filters type-aware of same token types. there aren't filters use standardtokenizer's types.
Comments
Post a Comment