title: EdgeNGramFilterFactory is not working fine in solr
body: <p>I am trying <strong>solr.EdgeNGramFilterFactory</strong> in <strong>solr</strong> which is <strong>explained</strong> <a href="https://github.com/sunspot/sunspot/wiki/Wildcard-searching-with-ngrams" rel="nofollow">here</a>
  I have added <code>&lt;filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" /&gt;</code> in the <strong>index analayzer</strong> in the <strong>fieldType</strong> of <strong>schema.xml</strong>. 
  As I know, <strong>solr.EdgeNGramFilterFactory</strong> creates tokens such as</p>
  
  <pre><code>whether - wh, whe, whet, wheth, whethe, whether.
  </code></pre>
  
  <p>So, when I am <strong>searching</strong> for the query - <strong>whether</strong>, it gives <strong>all documents</strong> that contains the <strong>tokens of the whether word</strong> </p>
  
  <pre><code>"suggestion":["wether","ether","heather","walther" "weather","wheeler", "fletcher", "shepherd","together","whenever","wherever","another","blather","bother","brother","chothe","eiher","either","farther","father""feather","further","gather","goethe","günther" "higher","hucher","leather","mother","neither","nyheter", "other","rather","whence",      "where""shepherds","weathered","altogether","breathed","brothers","feathers","hitherto","northern","preacher","southern","withered"]
  </code></pre>
  
  <p>I need to only the <strong>relevant documents</strong> such as for <strong>whether</strong> word, I need <code>weather, wether, ether, heather</code> <strong>not</strong> the <strong>unnecessary document</strong> like <code>brother, shepherd etc</code>.</p>
  
  <p><strong>schema.xml</strong>:</p>
  
  <pre><code>&lt;fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100"&gt;
         &lt;analyzer type="index"&gt;
          &lt;tokenizer class="solr.KeywordTokenizerFactory"/&gt;
          &lt;filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="15"/&gt;
          &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
          &lt;/analyzer&gt;
          &lt;analyzer type="query"&gt;
          &lt;tokenizer class="solr.KeywordTokenizerFactory"/&gt;
          &lt;filter class="solr.NGramFilterFactory" minGramSize="2" maxGramSize="15" /&gt;
          &lt;filter class="solr.LowerCaseFilterFactory"/&gt;        
      &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre>
  
  <p><strong>solrconfig.xml :</strong> </p>
  
  <pre><code>&lt;searchComponent name="suggest" class="solr.SpellCheckComponent"&gt;
  &lt;lst name="spellchecker"&gt;
        &lt;str name="name"&gt;default&lt;/str&gt;
        &lt;str name="field"&gt;term&lt;/str&gt;
       &lt;str name="dictionaryImpl"&gt;DocumentDictionaryFactory&lt;/str&gt;
        &lt;str name="lookupImpl"&gt;org.apache.solr.spelling.suggest.jaspell.JaspellLookupFactory&lt;/str&gt;
        &lt;str name="buildOnCommit"&gt;true&lt;/str&gt;
        &lt;str name="queryAnalyzerFieldType"&gt;textSpell&lt;/str&gt;
        &lt;/lst&gt; 
      &lt;/searchComponent&gt;
  
     &lt;requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy"&gt;
      &lt;lst name="defaults"&gt;
        &lt;str name="df"&gt;term&lt;/str&gt;
        &lt;str name="spellcheck"&gt;on&lt;/str&gt;
        &lt;str name="spellcheck.dictionary"&gt;default&lt;/str&gt;
        &lt;str name="spellcheck.onlyMorePopular"&gt;true&lt;/str&gt;
        &lt;str name="spellcheck.count"&gt;500&lt;/str&gt;
      &lt;/lst&gt;
      &lt;arr name="components"&gt;
        &lt;str&gt;suggest&lt;/str&gt;
      &lt;/arr&gt;
    &lt;/requestHandler&gt;
  </code></pre>