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