Skip to content
Advertisement

In ElasticSearch, how to search for a large list of keywords

I have built the below query in python with ElasticSearch library loaded. I’d like to keep expanding the list below so I can find the corresponding data for the ones within the list.
How do I pass the “list” into the ElasticSearch query so later I can just keep expanding the “list” once I need to add more (like hundreds) into my search list?

JavaScript

Advertisement

Answer

Probably you are looking for terms query

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement