title: Why is my leading wildcard search failing in Solr?
body: <p>I have a text field defined that I use copyField to fill with various source fields, and the goal is for this one field to be what I use to search my Solr index. </p>
  
  <p>This text field is defined to use this custom fieldType "text_en_splitting_reversed." I created this field type by copying the example "text_en_splitting" and adding the ReversedWildcardFilterFactory to the index analyzer.</p>
  
  <pre><code>&lt;!-- Just like text_en_splitting, but with the addition of reversed tokens for leading wildcard matches --&gt;
  &lt;fieldType name="text_en_splitting_reversed" 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="lang/stopwords_en.txt"
              enablePositionIncrements="true"
              /&gt;
      &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" types="word-delim-types.txt" /&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.ReversedWildcardFilterFactory" withOriginal="true"
         maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/&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="lang/stopwords_en.txt"
              enablePositionIncrements="true"
              /&gt;
      &lt;filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"  types="word-delim-types.txt" /&gt;
      &lt;filter class="solr.LowerCaseFilterFactory"/&gt;
      &lt;filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/&gt;
      &lt;filter class="solr.PorterStemFilterFactory"/&gt;
    &lt;/analyzer&gt;
  &lt;/fieldType&gt;
  </code></pre>
  
  <p>My primary problem: When I search using a leading wildcard, I get unexpected results. For example, I know one particular search I'm doing for "*car" should return a single match (the document contains the word "racecar"). Since this was failing, I decided to debug it in the analyzer tool in the Solr Admin. Here is a screenshot of my test:</p>
  
  <p><img src="https://i.stack.imgur.com/0jXSX.png" alt="Leading wildcard issue"></p>
  
  <p>I'm new to this analyzer tool, but shouldn't the right side have retained the leading asterisk all the way down? And why doesn't this end up matching? Am I expected to do the reverse processing of the user's entered keywords?</p>
  
  <p>Now, in my index query config, I am set to use edismax. However, in the admin analyzer gui, I don't see a way to control whether it's using the standard parser or edismax. (Perhaps it doesn't matter?)</p>
  
  <p>In case this information may help provide more context, I am going to run down my goals for this particular field being indexed:</p>
  
  <ul>
  <li>I would like *car to match racecar. <strong>This is not working.</strong></li>
  <li>I would like $30 to match documents containing $30, but NOT those containing 30 (without the dollar sign preceeding). So I added a types="" attribute where I define $ as a DIGIT. This <strong>is</strong> working.</li>
  <li>I would like 30 to match documents containing $30. <strong>This is not working.</strong></li>
  </ul>