SOLR-1900: make getDocSet honor deleted docs

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@943994 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-05-13 19:59:33 +00:00
parent ee5ec3ed32
commit 57074100f7
1 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import org.apache.lucene.index.*;
import org.apache.lucene.search.*;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
@ -639,7 +640,9 @@ public class SolrIndexSearcher extends IndexSearcher implements SolrInfoMBean {
Fields fields = sir.fields();
Terms terms = fields.terms(t.field());
BytesRef termBytes = new BytesRef(t.text());
DocsEnum docsEnum = terms==null ? null : terms.docs(null, termBytes, null);
Bits skipDocs = sir.getDeletedDocs();
DocsEnum docsEnum = terms==null ? null : terms.docs(skipDocs, termBytes, null);
if (docsEnum != null) {
DocsEnum.BulkReadResult readResult = docsEnum.getBulkResult();