2

I am trying to create a new watcher using PUTWatch API of JAVA ElasticSearch. I am following this to create it. From that link:

 SearchRequest request = Requests.searchRequest("idx").source(searchSource()
    .query(filteredQuery(matchQuery("response", 404), boolFilter()
        .must(rangeFilter("date").gt("{{ctx.trigger.scheduled_time}}"))
        .must(rangeFilter("date").lt("{{ctx.execution_time}}")))));

When I try the same , I am getting The method searchSource is not defined. Can somebody help me?

Priyansh Goel
  • 2,660
  • 1
  • 13
  • 37

0 Answers0