문제


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