title: Elasticsearch with NEST - How to ignore punctuation when searching
body: <p>Using Elasticsearch I'm attempting to query an index with a string provided by a user. My documents contain punctuation which I'd like to preserve so they appear correctly when retrieved, however I don't want that punctuation to affect any search results whether or not it was provided in the query. For example:</p>
  
  <p>Example document:</p>
  
  <pre><code>{ name: "joe's amazing document" }
  </code></pre>
  
  <p>When querying using the standard analyzer for <code>"joe's amazing document"</code> this works fine, however if the user types in <code>"joes amazing document"</code> this is not an exact match and the document gets lost amongst other low-scoring matches. </p>
  
  <p>I've been searching to no avail so far to find how to do this with NEST - I suspect I may need to use a char_filter <a href="http://elasticsearch-users.115913.n3.nabble.com/excluding-punctuation-from-fields-td4002385.html#a4018580" rel="nofollow noreferrer">such as this</a> but looking at the tests from NEST project source I can't see how to add my own custom char_filter with my own specified mapping, it only seems to allow me to specify a filter that Elasticsearch already knows about (extending <a href="https://github.com/Mpdreamz/NEST/blob/master/src/Nest/Domain/Analysis/CharFilter/CharFilterBase.cs" rel="nofollow noreferrer"><code>CharFilterBase</code></a> only allows specifying the name of an existing filter to use)</p>
  
  <p>Can anyone point me in the right direction with what I'm trying to do here? I'm aware I might be going about this all wrong so any help would be great - can I do this somehow with NEST or Elasticsearch, or do I need to customise Elasticsearch somehow? Or is there a solution out there which I've just been unable to find? Thanks!</p>
  
  <p><strong>Update:</strong> Thanks to femtoRgon's answer pointing me in the right direction please see <a href="https://stackoverflow.com/a/22159076/1730317">my answer</a> below for how to use the <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-snowball-analyzer.html" rel="nofollow noreferrer">Snowball analyzer</a> in NEST.</p>