title: Make Solr ignore a trailing slash?
body: <p>I have an indexed field <code>url</code> where some of my docs have a trailing slash at the end of their <code>url</code> field, others do not. I want to query this field in Solr while ignoring the trailing slash, so that all matching results come back regardless if they have a trailing slash at the end or not.</p>
  
  <p>For example, if I send query: <code>q=url:https://www.test.com/api/v1/test/</code> I want to get back any docs that have <code>url</code> field of <code>https://www.test.com/api/v1/test/</code> OR <code>https://www.test.com/api/v1/test</code>.</p>
  
  <p>Similarly, if I send query without a trailing slash, I want the same results as above (<code>url</code> with OR without trailing slash).</p>
  
  <p>How can this be done? I know about Solr wildcard feature, but I do not want to ignore any ending character (e.g. <code>url:https://www.test.com/api/v1/test?</code> should not return docs with <code>url</code> of <code>https://www.test.com/api/v1/test</code>). I only want this wildcard effect for one trailing slash.</p>
  
  <p>If it helps, I am on Solr 4 (yes I know it is old).</p>