Is there any method to convert Query back to its builder format ie Query.Builder, BoolQuery.Builder etc to add more conditions (like adding more must conditions) into it?
or
is there any Parent Builder class which can hold the all types of Builders in it?
Hello!
Unfortunately both options are not available, the library follows the standard Java builder pattern, so a builder cannot be converted once built, and every object has its specific builder. One thing that's available is: once a specific query has been built, it can be converted to the parent type (for example, from a BoolQuery to a Query using _toQuery()).
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.