You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/02/18 19:05:44 UTC

svn commit: r1290836 - /lucene/dev/trunk/lucene/MIGRATE.txt

Author: uschindler
Date: Sat Feb 18 18:05:44 2012
New Revision: 1290836

URL: http://svn.apache.org/viewvc?rev=1290836&view=rev
Log:
Update migrate docs for live docs

Modified:
    lucene/dev/trunk/lucene/MIGRATE.txt

Modified: lucene/dev/trunk/lucene/MIGRATE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/MIGRATE.txt?rev=1290836&r1=1290835&r2=1290836&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/MIGRATE.txt (original)
+++ lucene/dev/trunk/lucene/MIGRATE.txt Sat Feb 18 18:05:44 2012
@@ -242,10 +242,10 @@ LUCENE-1458, LUCENE-2111: Flexible Index
   You can then .next() through the TermsEnum, or seek.  If you want a
   DocsEnum, do this:
 
-    Bits skipDocs = MultiFields.getDeletedDocs(reader);
+    Bits liveDocs = reader.getLiveDocs();
     DocsEnum docsEnum = null;
 
-    docsEnum = termsEnum.docs(skipDocs, docsEnum);
+    docsEnum = termsEnum.docs(liveDocs, docsEnum);
 
   You can pass in a prior DocsEnum and it will be reused if possible.
 
@@ -262,7 +262,7 @@ LUCENE-1458, LUCENE-2111: Flexible Index
 
     String field;
     BytesRef text;
-    DocsEnum docsEnum = reader.termDocsEnum(reader.getDeletedDocs(), field, text);
+    DocsEnum docsEnum = reader.termDocsEnum(reader.getLiveDocs(), field, text);
 
   Likewise for DocsAndPositionsEnum.
 
@@ -273,8 +273,8 @@ LUCENE-1458, LUCENE-2111: Flexible Index
     import org.apache.lucene.util.Bits;
     import org.apache.lucene.index.MultiFields;
 
-    Bits delDocs = MultiFields.getDeletedDocs(indexReader);
-    if (delDocs.get(docID)) {
+    Bits liveDocs = MultiFields.getLiveDocs(indexReader);
+    if (!liveDocs.get(docID)) {
       // document is deleted...
     }