If you recently upgraded to Tridion 2011 and your search results are not what you expected please read on – with a few simple tips your search results will improve and you’ll stop singing that U2 song ‘I Still Haven’t Found What I’m Looking For’.
Tridion 2011 comes with the super-powered Solr search engine – this is an open-source search engine from the Apache project built on top of Lucene; new in Tridion 2011. Previous versions used Verity.
The search box on the dashboard works as advertised – it searches within the current context for matches – in all types of items from Components to Templates to Schemas. Context is important here. And you can still type Tridion TCM URIs in the box and open the item directly.
Wildcards are your friend
What makes the difference from a few items found and many are the wildcards you use. Simply place a * before the word and after and your chances for finding matches increases exponentially. This is especially true when searching in template code.
For example, if I want to find where the field intro_text is used in a template I can use *intro_text*.
Other wildcard combinations are possible with the ? character, saying to use any character. For example te?t will match test and text. Although probably not as useful as the * keyword – it is possible. Solr is built on top of Lucene – meaning it uses the Lucene search engine and adds additional features such as facets and an http-based API. For additional search help see http://lucene.apache.org/core/3_6_1/queryparsersyntax.html
Advanced Options
Using the Advanced search window you can increase the amount of items returned (default is 50) and filter the types of items searched. Perhaps the most important setting is the amount of items returned.
Populating the search index
After upgrading your existing installation to Tridion 2011 you will need to populate the Solr Search index first before search results are returned. You can do this with the TcmReIndex.exe tool located in the Tridion/bin folder. Without running this tool your search index is empty. Afterwards, whenever a user saves any item in Tridion the Seach Service populates the Tridion search index with that items’ content.
Summary
Tridion did a good job of including the powerful Solr search engine with Tridion 2011. With the new engine we have faster searches and more possibilities. With a little bit of luck your searches will help you find what you’re looking for.
Leave a Reply