title: Wrong facet results with special characters in facet field
body: <p>I have implemented Solr Search and Faceting for e-commerce stores, and facing weired issue with facet filter faceting results. This happens only when we have special character (i.e. bracket) in the facet field otherwise everything works fine.</p>
  
  <p>I have implemented this using SolrNet. I checked doing raw queries into Solr directly and found that this issue might be in the Solr itself and not related to SolrNet.</p>
  
  <p>Example:</p>
  
  <p>I have numbers of products and filters like following:</p>
  
  <pre><code>RAM (GB)
    2 GB
    4 GB
    8 GB
  
  Memory (GB)
    4 GB
    8 GB
    16 GB
  </code></pre>
  
  <p>Each of facet options has some products into them, so the issue is not about facet.min count.  And I have applied the tagging properly as well.</p>
  
  <p>Now, one of this facet works fine while the other one doesn't seems to work with bracket in facet field.</p>
  
  <p>Here is my schema where I define facet fields.</p>
  
  <pre><code>&lt;dynamicField name="f_*"  type="string" indexed="true" stored="true" multiValued="true" required="false"  /&gt;
  &lt;dynamicField name="pa_*" type="string" indexed="true" stored="true" multiValued="true" required="false" /&gt;
  </code></pre>
  
  <p>Facet works fine when I do query for field starting as pa_, but not with f_.</p>
  
  <p>Query I am doing, into Solr:</p>
  
  <pre><code>../select?indent=on&amp;wt=json&amp;facet.field={!ex%3Dpa_RAM(GB)}pa_RAM(GB)&amp;fq={!tag%3Dpa_RAM\(GB\)}pa_RAM\(GB\):2%2BGB&amp;q=CategoryID:(1+OR+2+OR+3+OR+4)&amp;start=0&amp;rows=10&amp;defType=edismax&amp;facet.mincount=1&amp;facet=true&amp;spellcheck.collate=true
  </code></pre>
  
  <p>Image1
  <a href="https://i.stack.imgur.com/PUt0H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PUt0H.png" alt="enter image description here"></a></p>
  
  <p>This works fine as expected.</p>
  
  <p>Another query:</p>
  
  <pre><code>../select?indent=on&amp;wt=json&amp;facet.field={!ex%3Df_Memory(GB)}f_Memory(GB)&amp;fq={!tag%3Df_Memory\(GB\)}f_Memory\(GB\):4%2BGB&amp;q=CategoryID:(1+OR+2+OR+3+OR+4)&amp;start=0&amp;rows=10&amp;defType=edismax&amp;facet.mincount=1&amp;facet=true&amp;spellcheck.collate=true
  </code></pre>
  
  <p>Gives following result:</p>
  
  <p>Image 2<a href="https://i.stack.imgur.com/rCoOx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rCoOx.png" alt="enter image description here"></a></p>
  
  <p>This doesn't work. However if I remove special character from query and indexed data this works fine. </p>
  
  <p>Moreover, the returned facet option is the selected one on which I added filter tag. All other facet options are not returned by Solr.</p>
  
  <p>I am unable to figure out why this happens and how to fix it.</p>
  
  <p>Any clue \ idea will be great!</p>
  
  <p>Please refer this query and Images.(It's not a right way or perfect solution)</p>
  
  <pre><code>../select?indent=on&amp;wt=json&amp;facet.field={!ex%3Df_Memory(GB)}f_Memory(GB)&amp;fq={!tag%3Df_Memory(GB)}f_Memory\(GB\):4%2BGB&amp;q=CategoryID:(1+OR+2+OR+3+OR+4)&amp;start=0&amp;rows=10&amp;defType=edismax&amp;facet.mincount=1&amp;facet=true&amp;spellcheck.collate=true&amp;fl=Id,Name,f_Memory(GB)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tHwsU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tHwsU.png" alt="enter image description here"></a></p>
  
  <p>Reference link :<a href="https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-LocalParametersforFaceting" rel="noreferrer">Local Parameters for Faceting</a></p>
  
  <p>Please help me!</p>