title: How to ignore whitespaces on solr query
body: <p>I have the name <code>Audioslave</code> indexed on Solr and I want to match that document to the query string <code>Audio Slave</code>.</p>
  
  <p>I have the following rule configured:</p>
  
  <pre><code>&lt;fieldType name="text_filter" class="solr.TextField" positionIncrementGap="100"&gt;
    &lt;analyzer type="index"&gt;
      &lt;tokenizer class="solr.KeywordTokenizerFactory" /&gt;
      &lt;filter class="solr.WordDelimiterFilterFactory"
              catenateWords="1"
              catenateNumbers="1"
              catenateAll="1"
              preserveOriginal="1"
              generateWordParts="1"
              generateNumberParts="1"/&gt;
      &lt;filter class="solr.TrimFilterFactory" /&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.WordDelimiterFilterFactory"
              catenateWords="1"
              catenateNumbers="1"
              catenateAll="1"
              preserveOriginal="1"
              generateWordParts="1"
              generateNumberParts="1"/&gt;
      &lt;filter class="solr.TrimFilterFactory" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory" /&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre>
  
  <p>And a field using it:</p>
  
  <pre><code>&lt;field name="artist_name_filter"  type="text_filter"  multiValued="false" indexed="true" stored="true" required="false" /&gt;
  </code></pre>
  
  <p>When using Solr analysis tool everything looks good.</p>
  
  <p>The Query part is the following:</p>
  
  <ul>
  <li>The KeywordTokenizerFactory generates <code>Audio Slave</code>, </li>
  <li>Then the WordDelimiterFilterFactory splits it into <code>Audio Slave</code>, <code>Audio</code>, <code>AudioSlave</code> and <code>Slave</code> (lets just use the 3rd column (<code>AudioSlave</code>) from here.</li>
  <li>The TrimFilterFactory keeps it as <code>AudioSlave</code></li>
  <li>Finally the LowerCaseFilterFactory change it to <code>audioslave</code></li>
  </ul>
  
  <p>On the other hand, the index part is:</p>
  
  <ul>
  <li>The KeywordTokenizerFactory generates <code>Audioslave</code>, </li>
  <li>Then the WordDelimiterFilterFactory and TrimFilterFactory keeps it as <code>Audioslave</code></li>
  <li>Finally the LowerCaseFilterFactory change it to <code>audioslave</code></li>
  </ul>
  
  <p>So both fields should match, but the query returns no results: </p>
  
  <p><code>http://localhost:8983/solr/search_api/select?defType=edismax&amp;fq=type:Artist&amp;q=Audio%20slave&amp;qf=artist_name_filter&amp;wt=json</code></p>