I have to build complex request to elastic search, using spring.
Filter looks like:
field1 equals “string1”
AND
field2 equals “string2”
AND
(field3 matches “regex3” OR field4 matches “regex4”)
I’m trying to use class Criteria to build this request, but I cannot find examples how to use regex in it.
I’m new in elasticsearch, so if you know another practice how to get data with this filter, please tell me :)