Domanda


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!!

È stato utile?

Soluzione

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

"am going"

Please look here solr query syntax

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top