X-Pack side of elastic/elasticsearch#27469 (elastic/x-pack-elasticsearch#3071)
Original commit: elastic/x-pack-elasticsearch@99499b6bd6
This commit is contained in:
parent
e71b5639de
commit
601222903d
|
@ -139,7 +139,8 @@ public class SecurityIndexSearcherWrapper extends IndexSearcherWrapper {
|
|||
filter.add(roleQuery, SHOULD);
|
||||
if (queryShardContext.getMapperService().hasNested()) {
|
||||
// If access is allowed on root doc then also access is allowed on all nested docs of that root document:
|
||||
BitSetProducer rootDocs = queryShardContext.bitsetFilter(Queries.newNonNestedFilter());
|
||||
BitSetProducer rootDocs = queryShardContext.bitsetFilter(
|
||||
Queries.newNonNestedFilter(queryShardContext.indexVersionCreated()));
|
||||
ToChildBlockJoinQuery includeNestedDocs = new ToChildBlockJoinQuery(roleQuery, rootDocs);
|
||||
filter.add(includeNestedDocs, SHOULD);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue