Hi, I am trying to search the documents using a date range filter along with some keywords. I couldn't find any java api samples to do so. Could you please help me.
Normal search works with the following code: But am after a date range filter search.
SearchResponse<JsonNode> search = esClient.search(s -> s
.index(index)
.query(q -> q
.match(f -> f.field(searchKey).query(searchValue).fuzziness(fuzziness).operator(Operator.And))),
JsonNode.class);
version details:
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
<version>7.15.2</version>
</dependency>