Question


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

Was it helpful?

Solution

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

"am going"

Please look here solr query syntax

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top