As pointed out by @flobernd in my Github Issue related to working with the latest net client that the documentation for the latest is very sparse. Therefore, I'm trying to manage the AND operator in the Bool query, and it's quite different from the ones before Net API 5.x where we can use the && and || operators, Plus I tried the straight forward approach as I understoon that "the new client (starting from version 8.13) closely maps to the structure of the REST JSON structure":
I tried, and it resulted to the expected request query. However, is it correct that this is an AND? as it seems to not return any result. only when removing either one of the items. I tried with term as well, and removing the query by setting the value directly to the field as follows:
@alikleitcr7 Yes, this is what AND does It only returns the results for which „all“ query conditions are matching.
In your case, you specify 2 different ids for the same field, which means that your condition is never true.
If you want to return documents with either id1 or id2 you would have to use OR (as this will return all documents for which „at least one“ of the conditions are matching).
I’m only on mobile right now and sadly can’t help you with the syntax for your case where you want to check the existence of 2 specific items in the nested array.
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.