0
String searchText = "TEST";

.query(q -> q.bool(b -> b .must(c-> c .match(t -> t .field("FIELD NAME").query(searchText) ))

I need to pass String Array to query. Whats the best way I can do it.

3
  • can you explain what you want to achieve ? Commented Mar 20, 2023 at 13:11
  • ``` GET /index/_search { "size": 0, "query": { "bool": { "must": [ { "terms": { "JCODE": ["TRF","HPM"] } } ] } } } ``` I need to achieve something like this using Java client 8.6 Commented Mar 20, 2023 at 13:47
  • You can refer this for the answer. Thank you @Amit for trying to help out. discuss.elastic.co/t/… Commented Mar 20, 2023 at 13:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.