Sign in | Sign up

v2 Search Response

Tagged:

Currently contains 8 posts

Avatar

February 23, 2015 19:09

NBT

In the v1.1 search I can get all the nutrients for the fields I specify in the response. It looks like in v2 I only get those fields if there is an exact match. Correct? Or am I reading this incorrectly? If this is correct, will the v1.1 search be obsolete; i.e. I will need to rewrite? I currently snag all the nutrient field values in the response rather than when an item in the list is selected. Thanks :)

Avatar

February 25, 2015 17:10

silviogutierrez

I’m also wondering this. Having to do additional lookups per result would really slow everything down. The 1.1 API is much faster in this regard.

Avatar

February 25, 2015 17:48

Matt Silverman

Hi All —

In the 2.0 API, our focus is more on giving an exact result for what the user types in. However, if we cannot provide an exact result, we provide the list of search results with up to one attribute (calories, protein, or whatever you choose).

In 2.0 we are forcing you to hit the item Endpoint once a user chooses a search result, because that way we know which item satisfied the user’s request, and our machine learning helps us improve our ability to provide an exact match.

The downside of how we do it in API 1.1 is that we have no idea which search result a user chooses, which makes it impossible for us to improve the ranking of certain results.

Can you let me know if this explanation makes sense?

Avatar

March 09, 2015 18:09

NBT

Thanks Matt (yes, just getting back to this!). I understand now but it is going to cause me to rewrite quite a bit of code. Is 1.1 going to be phased out soon or can we use some combination of both 1.1 and 2? Do you have a date yet on when 2 will be rolled out?

Avatar

March 09, 2015 21:07

Matt Silverman

We will continue to support 1.1 indefinitely.

Avatar

March 10, 2015 11:35

NBT

Thanks! That allows us to hopefully get the project out-the-door before the rewrite (or at least give us some breathing space).

Avatar

March 12, 2015 22:55

silviogutierrez

Makes sense to me. Thanks for the explanation.

Avatar

April 28, 2015 14:19

yesdev_1

Question:

Strange Resource Id’s returned for query
Hello,

I am hitting the V2 Search API and finding 2 things.

I cannot get exact=true as a result even for queries that return 1 result. This is preventing me from returning the array of nutrients

The resource Ids returned to not match the expected values. Instead of a the long string (example 513fceb575b8dbbc21001502), I am getting values like r83ZuAxRq and 0EAbFjKng.

As such I cannot even call the specific item search to get those values back.

Thank you in advance for your advice and time!

Reply to thread