Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

"Inaccurate" query results when search phrase contains a hyphen

$
0
0

Hi there,

We have a line of products essentially named "product-5", "product-6", "product-7".

We've run into an issue where some users are unhappy that searching with the phrase "product-5" will return not only product-5, but also product-6 and product-7 in the search results.

I've played around with different search phrases such as "product-abc" which will return no results, and "product-532skdfaj" which will return exactly the same results as searching for "product-5".

It seems that when a number follows a hyphen that anything after the hyphen is ignored.

Is there a way to fix this? Or are we going about something the wrong way? This is the code we are executing for the search:

query = client.Search(Language.English).For(searchPhrase)
.InField(v => v.ItemName)
.InField(v => v.ItemLongDesc)
.InAllField()
.WithAndAsDefaultOperator()
.UsingSynonyms();

Thanks in advance,
Jordan


Viewing all articles
Browse latest Browse all 6894

Trending Articles