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 :)
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.
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?
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?
We will continue to support 1.1 indefinitely.
Thanks! That allows us to hopefully get the project out-the-door before the rewrite (or at least give us some breathing space).
Makes sense to me. Thanks for the explanation.
Strange Resource Id’s returned for query
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!