Allowing range queries with now ranges inside percolator

If use now-7d/d in a percolator query in 5.4.0+ I get an error:

Caused by: java.lang.IllegalArgumentException: Percolator queries are not allowed to use the current timestamp
at org.elasticsearch.index.IndexService.lambda$null$0(IndexService.java:149) ~[elasticsearch-5.4.0-SNAPSHOT.jar:5.4.0-SNAPSHOT]

I'm reading https://github.com/elastic/elasticsearch/commit/7bc2477c1b939b4ab0a0dab79dc179a2ae51a8de and it says that they are now supported. I even built a fresh elasticsearch from source through gradle assemble and tried it there but no go.

Any suggestions?

@EEEELIAS Thank you for reporting this. I verified that range queries with now are still not working in the percolator. There is no workaround. I'll open a pr to fix this.

Thanks! @mvg I pulled your branch and it's working! I guess this won't make it until 5.4.1 release so I will build an AMI with this deb I patched for now.

@EEEELIAS Thanks for confirming that the fix actually works!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.