Question about Java Search API and building the queries

Hello,

I am trying to build an integration with a content management product and using Elastic as search engine for the documents in the system.
The product can be configured quite a bit and gets as far as presenting me with a query in the following syntax:

"must":{"match_phrase":{"Title":"test"}} ES_AND "must":{"match_phrase":{"Author":"admin"}}

The product works on per-field basis so this is what I get. I know the product expects fields to be grouped in the must operator.

What are my fastest options to get this into a correct Java API call. I think that the best option is to use the BoolQueryBuilder but rather than write a parsing that might already exist, I first wanted to ask the community for ideas.

JAVA HighLevelRestAPI / Elasticsearch v 7

Thanks,

Jurgen

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