user1740752
user1740752

Reputation: 563

Changed field to Ngram, now returning no results

I updated my schema mapping for text fields to:

<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">              
    <tokenizer class="solr.KeywordTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" axGramSize="15" side="front"/>

  </analyzer>
  <analyzer type="query">     
    <tokenizer class="solr.KeywordTokenizerFactory"/>
    <filter class="solr.LowerCaseFilterFactory"/>     
  </analyzer>
</fieldType>

However, after doing this, and re-indexing the index, I get no search results at all for any query string. I only see results if I enter a * for the q parameter.

Is my schema mapping completely wrong, or am I just missing something simple?

Upvotes: 1

Views: 123

Answers (1)

Okke Klein
Okke Klein

Reputation: 2549

It's a typo

axGramSize="15"

needs to be

maxGramSize="15"

Upvotes: 1

Related Questions