For Developers: Search with special characters
In Sitefinity's default search provider - Lucene.Net, you cannot search using underscores, as well as spaces and other punctuation.
By default, Sitefinity CMS uses its ObjectFactory to register Lucene default term analyzer - StandardAnalyzer. This analyzer splits strings by special characters. For example, searching the term news_item results in searching both news and item, rather than the complete string news_item. In such a case the user get the wrong results or no results at all.
To overcome this, you can use an alternative term analyzer - KeywordAnalyzer. You must register it using ObjectFactory, in the following way:
ObjectFactory.Container.RegisterType<Analyzer, KeywordAnalyzer>(
new
ContainerControlledLifetimeManager());
NOTE: KeywordAnalyzer does not split words in the searched term and takes the entire field text as a single token.
Once you register the analyzer, you must reindex the site.