diff --git a/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSet.java b/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSet.java index b0a01424901..1d88ba8d82c 100644 --- a/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSet.java +++ b/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSet.java @@ -52,7 +52,12 @@ public abstract class FilteredDocIdSet extends DocIdSet { public FilteredDocIdSet(DocIdSet innerSet) { _innerSet = innerSet; } - + + /** Return the wrapped {@link DocIdSet}. */ + public DocIdSet getDelegate() { + return _innerSet; + } + /** This DocIdSet implementation is cacheable if the inner set is cacheable. */ @Override public boolean isCacheable() { diff --git a/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java b/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java index 8e5d46b105a..92a8735f7e7 100644 --- a/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java +++ b/lucene/core/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java @@ -41,6 +41,11 @@ public abstract class FilteredDocIdSetIterator extends DocIdSetIterator { doc = -1; } + /** Return the wrapped {@link DocIdSetIterator}. */ + public DocIdSetIterator getDelegate() { + return _innerIter; + } + /** * Validation method to determine whether a docid should be in the result set. * @param doc docid to be tested