I understand that a query given no size will return 10 results by default.
Why, I must ask if size is 10000 and the query is specific to certain data, does it return results out side of the search criteria?
How then, would one construct a query like these that only return results from the search criteria, regardless of the size parameter?
First search using should...
{
"size":10000,
"query":
{
"bool":
{
"must":
[
{
"match": { "MsgType": "0" }
},
{
"match": { "beat.hostname":"ny2-prd-venus20"}
},
{
"bool":
{
"should":
[
{ "match": { "source": "/trades/BTEC-NY2-DC-PRD-2/var/20181107.log" }},
{ "match": { "source": "/trades/BTEC-NY2-DC-PRD-2/var/20181106.log" }}
]
}
}
]
}
}
}
This returns 10000 results regardless of the criteria and several source records that are not in the should which is inside the must???
Second search with no should...
{
"size":10000,
"query":
{
"bool":
{
"must":
[
{
"match": { "MsgType": "0" }
},
{
"match": { "beat.hostname":"ny2-prd-venus20"}
},
{
"match": { "source": "/trades/BTEC-NY2-DC-PRD-2/var/20181107.log" }
}
]
}
}
}
This returns 10000 results again similar to above.
There are not 10000 records matching either criteria, more like 8K records total.
Is there any way to specifically get these 8K records without a hefty must_not listing all other sources?