I'm creating a search where users can filter/facet based on terms that may contain a space (e.g Temporary work) on Sitecore 8.1 with Lucene.
My first thought was to store the fields as untokenized; when I do this the field is stored in the index as expected (with uppercase letters e.g. Temporary work), but when sitecore creates the lucene query from the Linq provider it lowers the search term which means I never get a match.
To get around this casing issue I figured the field should be analyzed, but with an analyzer that doesn't tokenize based on whitespace. I read that "KeywordAnalyzer - 'Tokenizes' the entire stream as a single token. This is useful for data like zip codes, ids, and some product names" so I created this in my index configuration:
<field fieldName="Job Type" type="System.String" storageType="YES" indexType="TOKENIZED" boost="1f" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider"> <analyzer type="Lucene.Net.Analysis.KeywordAnalyzer, Lucene.Net" /> </field>
I expected to see the term 'Temporary work' in the index but when I look in Luke I get the below where temporary and work have been split:
What am I misunderstanding here.