Skip to content

Commit 7d6c567

Browse files
committed
return null instead of empty doc set
null can more easily be optimized in other filters
1 parent 51e69e1 commit 7d6c567

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/elasticsearch/index/search/child/HasChildFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
147147
if (idReaderTypeCache != null) {
148148
return new ParentDocSet(reader, collectedUids, idReaderTypeCache);
149149
} else {
150-
return DocIdSet.EMPTY_DOCIDSET;
150+
return null;
151151
}
152152
}
153153

src/main/java/org/elasticsearch/index/search/child/HasParentFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
113113
if (idReaderTypeCache != null) {
114114
return new ChildrenDocSet(reader, parents, idReaderTypeCache);
115115
} else {
116-
return DocIdSet.EMPTY_DOCIDSET;
116+
return null;
117117
}
118118
}
119119

0 commit comments

Comments
 (0)