The preparation is to store some documents with significant size (~10kB each), and then fetch those documents with the following query.
The query is logged from Java API in terms of SearchRequestBuilder.toString()
The issue seems to occur particularly when ES is freshly started, i.e., it may be related to some caching.
Invoking the query for the first time may return only ~20 results, and invoking again afterwards will give all 25 espected results.
{
"size": 25,
"timeout": "2m",
"query": {
"bool": {
"filter": [{
"ids": {
"type": [
"LogMessage"
],
"values": [
"01e8430a-e1b2-1e7a-aa96-c1e943736030",
"01e8430a-e1b1-1804-9628-d5b9e12b0a84",
"01e8430a-e4af-1781-92ba-cff7229bf670",
"01e8430a-e1b3-13d6-9628-d5b9e12b0a84",
"01e8430a-e1b2-1f4e-badf-b7e530d25a2a",
"01e8430a-e1b4-1a4c-aa96-c1e943736030",
"01e8430a-e1b3-1fef-92ba-cff7229bf670",
"01e8430a-e1b1-1fb7-badf-b7e530d25a2a",
"01e8430a-e1b3-15b6-aa6a-3b4497e409fe",
"01e8430a-e1b4-1a79-aa6a-3b4497e409fe",
"01e8430a-e1b3-1ae7-9628-d5b9e12b0a84",
"01e8430a-e1b3-13d7-aa6a-3b4497e409fe",
"01e8430a-e1b1-1eeb-92ba-cff7229bf670",
"01e8430a-e1b3-1abc-92ba-cff7229bf670",
"01e8430a-e1b6-1a0a-aa6a-3b4497e409fe",
"01e8430a-e1b4-151b-aa96-c1e943736030",
"01e8430a-e3bc-1126-9a01-319778ddbf4e",
"01e8430a-e398-1ec7-bb4a-d9ce79562946",
"01e8430a-e28b-1b8d-bb4a-d9ce79562946",
"01e8430a-e4ed-15c0-bb4a-d9ce79562946",
"01e8430a-e1c0-112e-aa96-c1e943736030",
"01e8430a-e1bf-137d-aa96-c1e943736030",
"01e8430a-e1b1-1ee9-aa96-c1e943736030",
"01e8430a-e37a-1632-ac83-ff9b055f540e",
"01e8430a-e1f2-1507-bb4a-d9ce79562946"
],
"boost": 1.0
}
}
],
"disable_coord": false,
"adjust_pure_negative": true,
"boost": 1.0
}
},
"_source": {
"includes": [],
"excludes": [
"activities",
"transitions",
"plugins",
"rawTransitions"
]
}
}