title: Lucene search for a filename, using WordDelimiterFilterFactory
body: <p>If I search for toto.pdf, a token "pdf" is created for the search tI'm indexing some data, including filenames.</p>
  
  <p>What I want is, according to indexed filename:</p>
  
  <pre><code>MySupercool123girlfriend.jpg
  </code></pre>
  
  <p>And to be able tosearch it with:</p>
  
  <pre><code>supercool
  supercool123
  123
  girlfriend
  jpg
  </code></pre>
  
  <p>So at index it pretty easy to be able to use WordDelimiterFilterFactory so that some tokens are created, like:</p>
  
  <pre><code>my
  supercool
  mysupercool
  mysupercool123
  supercool123
  123
  girlfriend
  jpg
  girlfriend.jgp
  etc...
  </code></pre>
  
  <p>The matter is that at search time, I don't really know what I should do.</p>
  
  <p>If I use WordDelimiterFilterFactory at search time, <code>MySupercool123girlfriend.jpg</code> would match even with <code>toto.jpg</code> because in both cases a token <code>jpg</code> is created.
  <code>toto.jpg</code> should not be in the result list at all, so it's not a solution for me to have both results with the appropriate one having a better scoring</p>
  
  <hr>
  
  <p>Have you any recommendation to index and search for filenames?</p>