Sign in | Sign up

Incorrect Results Help

Tagged:

Currently contains 4 posts

Avatar

July 16, 2014 13:01

NBT

If the default boolean operator is AND why does the following give me results that include chicken, latte and coffee? How do I fix? I tried “mcdonalds AND hamburger” with the same results. Help would be appreciated.
{
“appId”: “xxxx”,
“appKey”: “xxxxxx”,
“query”: “mcdonalds hamburger”,
“offset”: 0,
“limit”: 10,
“min_score”: 0.5,
“fields”: [
“item_name”,
“brand_name”,
“nf_calories”,
“item_type”
]
}

July 16, 2014 13:09

Anonymous User

NBT,

Take note of the score field on each result. Notice that the exact match you are looking for has a score of ~= `3.7`. Your `min_score` is set to `0.5` this will include results that are not what you are looking for but may contain one of the words in the query. Typically exact matches will have a score above 1.1 if both words are in a given field.

So to solve your problem, set the `min_score` to `1.1`

Avatar

July 16, 2014 13:12

NBT

Thanks. Really appreciate your help.

July 16, 2014 13:21

Anonymous User

No problem, I am going to make a note to have our team add this link to the documentation. Thanks for asking a great question.

Reply to thread