I have a quite large index, well at least to me, 3 million records and adds between 500 to 2000 more a day.
There are 150 categories, I want to be able to search for query strings within those categories. There are also youtube videos that are available for each categories (sources, source_id). The search I have tried several different ways to achieve this. The example below, is searching category "source_id: 5, and youtube videos true, sorted descending, top 10, and searching on term NFL.
How do you create a query that does a query string search with multiple exact terms?
{
"size": 10,
"query" : {
"bool" : {
"should" : [
{ "term": { "source_id": 5}},
{ "term": { "youtube": true }}
],
"minimum_should_match": 2
},
"query_string": {
"query": "NFL",
"default_field": "title"
}
},
"sort":
{"created_at": "desc"}
}