2

Whenever I attempt to query the API with a specific recall_number, I receive the API error message. Is there another method for retrieving an individual record that I am overlooking in the docs?

Also, it would be nice to see what type of error response we are dealing with rather than the same error response for malformed APIs, URL encoded entities, and no results found. Any guidance on that would be welcomed!

  • Can you post an example, please? – Hans Nelsen Jun 24 '15 at 0:23
2

@Mark - I think you are trying to do something like this:

https://api.fda.gov/device/enforcement.json?search=recall_number.exact:Z-2338-2012

but are instead doing the following which, indeed, does not work (IMHO it should.. maybe someone from openFDA can chime in):

https://api.fda.gov/device/enforcement.json?search=recall_number:Z-2338-2012
  • That does seem to do the trick. I was using the search=recall_number:"Z-2338-2012" format, since the docs had indicated it was for exact matching. Never would have thought to use the ".exact" modifier outside of the count field, thanks! – Mark Jun 24 '15 at 19:49
  • This is correct. Specifically, non-exact fields get tokenized on all non-alphanumeric characters, Z-2338-2012 gets indexed as separate strings, Z and 2338 and 2012; conversely, when you use an exact field, it is not tokenized at all, so Z-2338-2012 remains Z-2338-2012. Hope that helps. – Hans Nelsen Jun 29 '15 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.