I'm currently working with Tridion 2011 SP1 and I'm come across an issue with search which means that it's not proving as useful as the client is expecting.
The client has a naming convention for components the follows a standard in which slashes are used heavily. eg:
this/is/a/component/1
This works well for their internal component management but it's causing major issues with Solr searches from within the CME.
Searching for part names (eg. 'this') in the above example returns no results.
I've had a look at the Solr schema for the tridion core and the culprit is the chosen tokenizer for the text field type.
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ReversedWildcardFilterFactory"/>
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
</analyzer>
<analyzer type="query">
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
As the main tokenizer in use is the WhitespaceTokenizerFactory
, the component name isn't being tokenized into human searchable tokens (ie. split on slashes in this case).
This would all be solved by using a different tokenizer such as the StandardTokenizerFactory
but this would obviously require changing the inbuilt Solr schema and running the reindex tool.
Is this a supported change? I understand that this would not be upgrade safe but it's becoming such a big issue for the client, I'm happy to manage the extra configuration but I don't want to make any unsupported changes to the internal config which would impact support agreements etc.