title: Solr Fuzzy Search for similar words
body: <p>I am trying to do a fuzzy search for "jahngir" ~ 0.2, which does not return any results.  My indexes has records with data "JAHANGIR RAHMAN MD".   If I try a search with exact word "jahangir" ~ 0.2, it works.  Can someone please help, on what I am doing wrong. I have spent a lot of time trying to figure out on how the Solr Fuzzy search works.  Any links which explain Solr Fuzzy search would be helpful.  Below is the text field that I am using for indexing.  Thanks in advance.</p>
  
  <pre><code> &lt;fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"&gt;
    &lt;analyzer type="index"&gt;
      &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
      &lt;!-- in this example, we will only use synonyms at query time
      &lt;filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/&gt;
      --&gt;
      &lt;!-- Case insensitive stop word removal.
        add enablePositionIncrements=true in both the index and query
        analyzers to leave a 'gap' for more accurate phrase queries.
      --&gt;
      &lt;filter class="solr.StopFilterFactory"
              ignoreCase="true"
              words="stopwords.txt"
              enablePositionIncrements="true"
              /&gt;
      &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
      &lt;filter class="solr.CommonGramsFilterFactory" words="stopwords.txt" ignoreCase="true"/&gt;
      &lt;filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front"/&gt;
      &lt;filter class="solr.PhoneticFilterFactory" encoder="DoubleMetaphone" inject="false"/&gt;
    &lt;/analyzer&gt;
    &lt;analyzer type="query"&gt;
      &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
      &lt;filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/&gt;
      &lt;filter class="solr.StopFilterFactory"
              ignoreCase="true"
              words="stopwords.txt"
              enablePositionIncrements="true"
              /&gt;
      &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
      &lt;filter class="solr.CommonGramsFilterFactory" words="stopwords.txt" ignoreCase="true"/&gt;
      &lt;filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front"/&gt;
      &lt;filter class="solr.PhoneticFilterFactory" encoder="DoubleMetaphone" inject="false"/&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre>
  
  <hr>
  
  <p>Here is the configuration that worked for me after the response. Thanks!</p>
  
  <pre><code>&lt;!-- Modified to fit fuzzy queries --&gt;  
      &lt;fieldType name="text_exact_fuzzy" class="solr.TextField" omitNorms="false"&gt;
        &lt;analyzer type="index"&gt;
            &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
            &lt;filter class="solr.StandardFilterFactory"/&gt;
            &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
          &lt;/analyzer&gt;
        &lt;analyzer type="query"&gt;
          &lt;tokenizer class="solr.StandardTokenizerFactory"/&gt;
          &lt;filter class="solr.StandardFilterFactory"/&gt;
          &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
        &lt;/analyzer&gt;
      &lt;/fieldType&gt;
  </code></pre>