質問


I want to perform exact substring match in Solr, i.e.

 am going

should match(including stopwords, in same order) the document containing

  I am going to school

The substring is free text entered by end user. I have set-up my schema.xml as follows:

 <fieldType name="c_text" class="solr.TextField">
  <analyzer>
    <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.StandardFilterFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
  </analyzer>
</fieldType>

It's not working. What am I missing out. Please suggest! I am a newbie to Solr.
Thanks!!

役に立ちましたか?

解決

You should surround the words of your query which form the phrase with "". Like this

"am going"

Please look here solr query syntax

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top