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