It seems like the Umbraco.TypedSearch dosen't return any results when the query search contains a dash, e.g. "techno-cat". Searching for "techno" or "cat" or "techno cat" works fine, while techno-cat returns 0 results.
Of course, I could just remove the "dash" before searching, but in one case we have a search combination of "a-bcde", so removing the dash won't find this exact search term and that's a big problem.
There was a discussion about this recently in Slack as it happens.
What you need to do is escape your search term. There is a string extension method called .Escape() which is accessible via the Examine.LuceneEngine.SerachCriteria namespace :-)
Umbraco.TypedSearch - dash problem
Hello guys
It seems like the Umbraco.TypedSearch dosen't return any results when the query search contains a dash, e.g. "techno-cat". Searching for "techno" or "cat" or "techno cat" works fine, while techno-cat returns 0 results.
Of course, I could just remove the "dash" before searching, but in one case we have a search combination of "a-bcde", so removing the dash won't find this exact search term and that's a big problem.
This issue is discovered on sites running v. 7.
Any idea where to look or to tweak?
Hi Jan,
There was a discussion about this recently in Slack as it happens.
What you need to do is escape your search term. There is a string extension method called .Escape() which is accessible via the Examine.LuceneEngine.SerachCriteria namespace :-)
Thanks,
Nik
is working on a reply...