I have 3 field in my document:
- id
- title
- txt
I have inserted several records into the index(articles) with the following code:
$es = Elasticsearch\ClientBuilder::create()->build();
$params = [
'index'=>'articles',
'type' => 'article'
];
for ($i=1; $i<50000; $i++) {
$params['body'] = [
'id' => $i,
'title'=>'some title '.$i,
'txt'=>'some text '.$i
];
$response = $es->index($params);
}
Now I want to retrieve records where id > 20000
.
How can perform filters like this, in Elasticsearch?