I am using Solr to power faceting features for our e-commerce application. Its been implemented in standard way as described here https://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters
On application side, we have used facets returned by Solr to offer filtering experience on UI and the URLs are built using the facets as params. These parameters are then used to further pass on the faceting parameters for fq into Solr.
This works great except that our URLs are case sensitive as the moment we change to small case the facet query no longer work and gives us Undefined field error.
One solution to overcome this issue is to have all facets indexed as small case. But as the facets are built from Solr faceting results itself so we get results in small case too. And then on front end, we loose the original case and it can't be managed by CSS, as for many facets we need to preserve the case, like RAM should be displayed as RAM and not as Ram or ram. Similarly, microSD needs to be displayed as microSD and not Microsd or microsd.
We see here https://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters as requests are made in small case
q=mainquery&fq=status:public&fq=**doctype:pdf**&facet=on&**facet.field=doctype**
But results are displayed in proper case
=== Document Type ===
[ ] Word (42)
[x] PDF (96)
[ ] Excel(11)
[ ] HTML (63)
For us, these request does not work and give us error as undefined field!
Are we doing something wrong so Solr works case sensitive while making request and not as per this help doc? Or there is a mistake in Solr help doc itself?
That is the (very) old, non-maintained wiki page and is not a decent reference. Use the current reference doc. And the figure is just meant as an example of how the UI could be presented, you'd still have to use the correctly indexed version when filtering.
Everything in Solr is case sensitive, faceting is not a special case.
You can solve this by having a separate field for filtering (a keywordtokenizer with a lowercasefilter) and one for display (string/keywordtokenizer without the lowercase filter).