Read more than 10 hits from index
lwluc opened this issue · 1 comments
lwluc commented
Description:
I want to read from Elasticsearch. To do so I am using a trigger
.
But I only get the first 10 hits (Elasticsearch default).
So how to I get more than 10 results? Am I missing something in the docu?
@App:name("Elastic")
@App:description("Read from elastic")
@sink(type="log", @map(type="json"))
define stream console (id string);
define trigger TriggerStream at every 1 sec;
define stream TempStream (id string);
@Store(type="elasticsearch", hostname="localhost", port="9200", index.name="input", @map(type="json"))
define table input (id string);
from TriggerStream join input
select id
insert into TempStream;
from TempStream select id insert into console;
Affected Product Version: v3.2.0
OS, DB, other environment details and versions: Elasticsearch Version 7.6.2
lwluc commented
Quick-fix: Modify the ElasticsearchRecordIterator
especially the SearchSourceBuilder
.
Add the size
option to increase the number of search hits to be returned (searchSourceBuilder.query(queryBuilder).size(1000);
)