Search single letter

Vote:
 

 

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..

 

 

 

#32678
Sep 11, 2009 16:09
Vote:
 
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?
#32679
Sep 11, 2009 16:49
Vote:
 

 

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'

 

 

#32697
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.