Try our conversational search powered by Generative AI!

Search single letter



I need to perform a search on a single letter across the site's content. For example the client has a new product called N and we need to get search results for all content items containing the letter N on its own and not part of a word.

I want to know if this is possible within the EpiServer search component, searching on 1 character? 

The current search facility is built using SearchDataSource. And a search on the letter N returns everything because a lot of words contain the letter N.

The regular expression of what I am trying to achieve is  \sN\s|N[.]|^N\s

or if I was writing a SQL query I would use  something like'%20N%20', '%20.' etc..




Sep 11, 2009 16:09
I think the "OnlyWholeWords" property of the SearchDataSource should work even for single character words, if they are not filtered from the index or something like that. Have you tried it?
Sep 11, 2009 16:49


I have now tried this but it still doesn't work for single letter searches. It works fine for a search on 2 characters such as 'mm' but for for single i.e. 'n'



Sep 14, 2009 10:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.