title: Solr search with/without hyphen
body: <p>I got an issue trying to get relevant search results working with words with and without hyphen. I created two documents, one with "wifi" and one with "wi-fi" in the "text" field.</p>
  
  <p>When searching "wifi", both document appears in the search result, which is fine. When searching "wi-fi", only the document with "wi-fi" appears in the search result.</p>
  
  <p>Here is my configuration :</p>
  
  <pre><code>&lt;field name="text" type="text" indexed="true" stored="true" omitNorms="true" /&gt;
  
  &lt;fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"&gt;
    &lt;analyzer type="index"&gt;
        &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
        &lt;charFilter class="solr.HTMLStripCharFilterFactory"/&gt;
        &lt;filter class="solr.ASCIIFoldingFilterFactory" /&gt;
        &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/&gt;
        &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" preserveOriginal="1" /&gt;
        &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
        &lt;filter class="solr.PorterStemFilterFactory"/&gt;
        &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt;
    &lt;/analyzer&gt;
    &lt;analyzer type="query"&gt;
        &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
        &lt;charFilter class="solr.HTMLStripCharFilterFactory"/&gt;
        &lt;filter class="solr.ASCIIFoldingFilterFactory" /&gt;
        &lt;filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/&gt;
        &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" preserveOriginal="1" /&gt;
        &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
        &lt;filter class="solr.PorterStemFilterFactory"/&gt;
        &lt;filter class="solr.RemoveDuplicatesTokenFilterFactory"/&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre>
  
  <p>Here is the result of the analyzis : <a href="https://www.evernote.com/shard/s7/sh/f1bab83a-7fd5-4bf3-9e67-239ea0c71441/98b1103577638734fb9335f755591b82/deep/0/Solr-Admin-(jeanfrancoiscote.egzakt.com).png" rel="noreferrer">https://www.evernote.com/shard/s7/sh/f1bab83a-7fd5-4bf3-9e67-239ea0c71441/98b1103577638734fb9335f755591b82/deep/0/Solr-Admin-(jeanfrancoiscote.egzakt.com).png</a></p>
  
  <p>Debug of the query when searching "wi-fi". I can't find out why it doesn't find both documents :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;response&gt;
  
  &lt;lst name="responseHeader"&gt;
    &lt;int name="status"&gt;0&lt;/int&gt;
    &lt;int name="QTime"&gt;1&lt;/int&gt;
    &lt;lst name="params"&gt;
      &lt;str name="debugQuery"&gt;true&lt;/str&gt;
      &lt;str name="indent"&gt;true&lt;/str&gt;
      &lt;str name="q"&gt;wi-fi&lt;/str&gt;
      &lt;str name="wt"&gt;xml&lt;/str&gt;
    &lt;/lst&gt;
  &lt;/lst&gt;
  &lt;result name="response" numFound="1" start="0"&gt;
    &lt;doc&gt;
      &lt;int name="id"&gt;1869&lt;/int&gt;
      &lt;str name="route"&gt;@sujet_simple?sujet_id=1869&amp;amp;slug=wi-fi&lt;/str&gt;
      &lt;str name="name"&gt;Wi-fi&lt;/str&gt;
      &lt;str name="text"&gt;&amp;lt;p&amp;gt;
      Wi-fi&amp;lt;/p&amp;gt;
  &lt;/str&gt;
      &lt;long name="_version_"&gt;1493472450933948416&lt;/long&gt;&lt;/doc&gt;
  &lt;/result&gt;
  &lt;lst name="debug"&gt;
    &lt;str name="rawquerystring"&gt;wi-fi&lt;/str&gt;
    &lt;str name="querystring"&gt;wi-fi&lt;/str&gt;
    &lt;str name="parsedquery"&gt;MultiPhraseQuery(text:"(wi-fi wi) (fi wifi)")&lt;/str&gt;
    &lt;str name="parsedquery_toString"&gt;text:"(wi-fi wi) (fi wifi)"&lt;/str&gt;
    &lt;lst name="explain"&gt;
      &lt;str name="1869"&gt;
  30.33298 = (MATCH) weight(text:"(wi-fi wi) (fi wifi)" in 0) [DefaultSimilarity], result of:
    30.33298 = score(doc=0,freq=1.0 = phraseFreq=1.0
  ), product of:
      0.99999994 = queryWeight, product of:
        30.332981 = idf(), sum of:
          7.684612 = idf(docFreq=1, maxDocs=1600)
          7.684612 = idf(docFreq=1, maxDocs=1600)
          7.684612 = idf(docFreq=1, maxDocs=1600)
          7.2791467 = idf(docFreq=2, maxDocs=1600)
        0.032967415 = queryNorm
      30.332981 = fieldWeight in 0, product of:
        1.0 = tf(freq=1.0), with freq of:
          1.0 = phraseFreq=1.0
        30.332981 = idf(), sum of:
          7.684612 = idf(docFreq=1, maxDocs=1600)
          7.684612 = idf(docFreq=1, maxDocs=1600)
          7.684612 = idf(docFreq=1, maxDocs=1600)
          7.2791467 = idf(docFreq=2, maxDocs=1600)
        1.0 = fieldNorm(doc=0)
  &lt;/str&gt;
    &lt;/lst&gt;
    &lt;str name="QParser"&gt;LuceneQParser&lt;/str&gt;
    &lt;lst name="timing"&gt;
      &lt;double name="time"&gt;1.0&lt;/double&gt;
      &lt;lst name="prepare"&gt;
        &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;lst name="query"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="facet"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="mlt"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="highlight"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="stats"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="debug"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
      &lt;/lst&gt;
      &lt;lst name="process"&gt;
        &lt;double name="time"&gt;1.0&lt;/double&gt;
        &lt;lst name="query"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="facet"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="mlt"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="highlight"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="stats"&gt;
          &lt;double name="time"&gt;0.0&lt;/double&gt;
        &lt;/lst&gt;
        &lt;lst name="debug"&gt;
          &lt;double name="time"&gt;1.0&lt;/double&gt;
        &lt;/lst&gt;
      &lt;/lst&gt;
    &lt;/lst&gt;
  &lt;/lst&gt;
  &lt;/response&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>