I want to execute multiple exact searches along with AND/OR operator.
For example search exact searche for "cloud computing" AND "cloud security".
What kind of query to use?
I am trying the following java api which is not working. Any suggestions would be appreciated.
srb = client.prepareSearch("index1");
QueryBuilder qb1 = (QueryBuilder) QueryBuilders.queryString("""+ searchText1+ """).field("content");
QueryBuilder qb2 = (QueryBuilder) QueryBuilders.queryString("""+ searchText2+ """).field("content");
qb = boolQuery.should(qb1).should(qb2);
srb.setQuery((org.elasticsearch.index.query.QueryBuilder) qb);
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.