My use case is this: I have an index items and an index userItems. In my query, I want to pull results that match a search term on both indices. HOWEVER, I want to only pull results from userItems that belong to the user.
I'm not sure how to structure a query where a bool clause is only applied to results from one of the indices and not the other. Can I do this in a single query? Do I need to split this into two different queries?
Hopefully that makes sense, by having a top level bool query this essentially says "give me all the documents that have "potato" in "myfield" in the "items" index, OR all the documents that have "potato" in "myfield" in the "userItems" index that also have the "username" of "bob".
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.