I spent several hours unsuccessfully trying to import the drug json files that you have available in the downloads section into the latest release of elasticseach (7.8.0). The download files don't appear to be elasticsearch export files. Do you have any instructions for importing your files into elasticsearch? The purpose for importing into elasticsearch is to use wildcard queries. Since you are using an elasticsearch DB, it seems reasonable that you would support imports into a similar DB.

New contributor
marieke zacher is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

That is correct: the download files are not Elasticsearch exports. The files follow the same JSON format that query results follow. Because the format is exactly the same as API query results, one can reuse existing code written for applications that process openFDA data.

We don't have instructions on how to import the download files back into Elasticsearch. You could write your own code to do so though. The simplest solution that comes to mind is to read through the array of JSON objects and send them to Elasticsearch for indexing. There are more sophisticated and more efficient ways of doing the import, of course.

| improve this answer | |

Your Answer

marieke zacher is a new contributor. Be nice, and check out our Code of Conduct.

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.