lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1632309 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/codecs/ lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/ lucene/core/ lucene/core/src/java/ lucene/core/src/java/org/apache/lucene/index/ lucene/core/src/java/org/ap...
Date Thu, 16 Oct 2014 13:45:36 GMT
Author: jpountz
Date: Thu Oct 16 13:45:35 2014
New Revision: 1632309

URL: http://svn.apache.org/r1632309
Log:
LUCENE-6010: Remove dead code.

Removed:
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/DoubleBarrelLRUCache.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/OpenBitSet.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/OpenBitSetDISI.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/OpenBitSetIterator.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestDoubleBarrelLRUCache.java
    lucene/dev/branches/branch_5x/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/MIGRATE.txt
    lucene/dev/branches/branch_5x/lucene/codecs/   (props changed)
    lucene/dev/branches/branch_5x/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
    lucene/dev/branches/branch_5x/lucene/core/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/DocValuesDocIdSet.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
    lucene/dev/branches/branch_5x/lucene/core/src/java/overview.html
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/schema/BoolField.java

Modified: lucene/dev/branches/branch_5x/lucene/MIGRATE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/MIGRATE.txt?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/MIGRATE.txt (original)
+++ lucene/dev/branches/branch_5x/lucene/MIGRATE.txt Thu Oct 16 13:45:35 2014
@@ -16,3 +16,8 @@ specialization of Collector that returns
 ## Removed ChainedFilter (LUCENE-5984)
 
 Users are advised to switch to BooleanFilter instead.
+
+## Removed OpenBitSet (LUCENE-6010)
+
+OpenBitSet only differs from LongBitSet by its ability to grow automatically.
+In case growth is required, it would need to be managed externally.

Modified: lucene/dev/branches/branch_5x/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
Thu Oct 16 13:45:35 2014
@@ -46,7 +46,6 @@ import org.apache.lucene.util.ArrayUtil;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.BytesRefBuilder;
-import org.apache.lucene.util.DoubleBarrelLRUCache;
 import org.apache.lucene.util.RamUsageEstimator;
 
 /** Handles a terms dict, but decouples all details of
@@ -76,7 +75,7 @@ public class BlockTermsReader extends Fi
   private TermsIndexReaderBase indexReader;
   
   // Used as key for the terms cache
-  private static class FieldAndTerm extends DoubleBarrelLRUCache.CloneableKey {
+  private static class FieldAndTerm implements Cloneable {
     String field;
     BytesRef term;
 

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java
Thu Oct 16 13:45:35 2014
@@ -61,33 +61,10 @@ public abstract class FilterDirectoryRea
 
   }
 
-  /**
-   * A no-op SubReaderWrapper that simply returns the parent
-   * DirectoryReader's original subreaders.
-   */
-  public static class StandardReaderWrapper extends SubReaderWrapper {
-
-    /** Constructor */
-    public StandardReaderWrapper() {}
-
-    @Override
-    public LeafReader wrap(LeafReader reader) {
-      return reader;
-    }
-  }
-
   /** The filtered DirectoryReader */
   protected final DirectoryReader in;
 
   /**
-   * Create a new FilterDirectoryReader that filters a passed in DirectoryReader.
-   * @param in the DirectoryReader to filter
-   */
-  public FilterDirectoryReader(DirectoryReader in) {
-    this(in, new StandardReaderWrapper());
-  }
-
-  /**
    * Create a new FilterDirectoryReader that filters a passed in DirectoryReader,
    * using the supplied SubReaderWrapper to wrap its subreader.
    * @param in the DirectoryReader to filter

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/DocValuesDocIdSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/DocValuesDocIdSet.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/DocValuesDocIdSet.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/DocValuesDocIdSet.java
Thu Oct 16 13:45:35 2014
@@ -20,7 +20,6 @@ import java.io.IOException;
 
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.FixedBitSet;
-import org.apache.lucene.util.OpenBitSet;
 
 /**
  * Base class for DocIdSet to be used with DocValues. The implementation
@@ -114,8 +113,8 @@ public abstract class DocValuesDocIdSet 
           return maxDoc;
         }
       };
-    } else if (acceptDocs instanceof FixedBitSet || acceptDocs instanceof OpenBitSet) {
-      // special case for FixedBitSet / OpenBitSet: use the iterator and filter it
+    } else if (acceptDocs instanceof FixedBitSet) {
+      // special case for FixedBitSet: use the iterator and filter it
       // (used e.g. when Filters are chained by FilteredQuery)
       return new FilteredDocIdSetIterator(((DocIdSet) acceptDocs).iterator()) {
         @Override

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
Thu Oct 16 13:45:35 2014
@@ -325,13 +325,7 @@ public final class FixedBitSet extends D
   /** Does in-place OR of the bits provided by the
    *  iterator. */
   public void or(DocIdSetIterator iter) throws IOException {
-    if (iter instanceof OpenBitSetIterator && iter.docID() == -1) {
-      final OpenBitSetIterator obs = (OpenBitSetIterator) iter;
-      or(obs.arr, obs.words);
-      // advance after last doc that would be accepted if standard
-      // iteration is used (to exhaust it):
-      obs.advance(numBits);
-    } else if (iter instanceof FixedBitSetIterator && iter.docID() == -1) {
+    if (iter instanceof FixedBitSetIterator && iter.docID() == -1) {
       final FixedBitSetIterator fbs = (FixedBitSetIterator) iter;
       or(fbs.bits, fbs.numWords);
       // advance after last doc that would be accepted if standard
@@ -381,13 +375,7 @@ public final class FixedBitSet extends D
   /** Does in-place AND of the bits provided by the
    *  iterator. */
   public void and(DocIdSetIterator iter) throws IOException {
-    if (iter instanceof OpenBitSetIterator && iter.docID() == -1) {
-      final OpenBitSetIterator obs = (OpenBitSetIterator) iter;
-      and(obs.arr, obs.words);
-      // advance after last doc that would be accepted if standard
-      // iteration is used (to exhaust it):
-      obs.advance(numBits);
-    } else if (iter instanceof FixedBitSetIterator && iter.docID() == -1) {
+    if (iter instanceof FixedBitSetIterator && iter.docID() == -1) {
       final FixedBitSetIterator fbs = (FixedBitSetIterator) iter;
       and(fbs.bits, fbs.numWords);
       // advance after last doc that would be accepted if standard
@@ -435,13 +423,7 @@ public final class FixedBitSet extends D
   /** Does in-place AND NOT of the bits provided by the
    *  iterator. */
   public void andNot(DocIdSetIterator iter) throws IOException {
-    if (iter instanceof OpenBitSetIterator && iter.docID() == -1) {
-      final OpenBitSetIterator obs = (OpenBitSetIterator) iter;
-      andNot(obs.arr, obs.words);
-      // advance after last doc that would be accepted if standard
-      // iteration is used (to exhaust it):
-      obs.advance(numBits);
-    } else if (iter instanceof FixedBitSetIterator && iter.docID() == -1) {
+    if (iter instanceof FixedBitSetIterator && iter.docID() == -1) {
       final FixedBitSetIterator fbs = (FixedBitSetIterator) iter;
       andNot(fbs.bits, fbs.numWords);
       // advance after last doc that would be accepted if standard

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
Thu Oct 16 13:45:35 2014
@@ -1376,16 +1376,6 @@ public final class FST<T> implements Acc
     public abstract boolean reversed();
   }
 
-  private static class ArcAndState<T> {
-    final Arc<T> arc;
-    final IntsRef chain;
-
-    public ArcAndState(Arc<T> arc, IntsRef chain) {
-      this.arc = arc;
-      this.chain = chain;
-    }
-  }
-
   /*
   public void countSingleChains() throws IOException {
     // TODO: must assert this FST was built with

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
Thu Oct 16 13:45:35 2014
@@ -815,22 +815,6 @@ public class PackedInts {
         throw new AssertionError("Unknown Writer format: " + format);
     }
   }
-  
-  /**
-   * Expert: Restore a {@link Reader} from a stream without reading metadata at
-   * the beginning of the stream. This method is useful to restore data when
-   * metadata has been previously read using {@link #readHeader(DataInput)}.
-   *
-   * @param in           the stream to read data from, positioned at the beginning of the
packed values
-   * @param header       metadata result from <code>readHeader()</code>
-   * @return             a Reader
-   * @throws IOException If there is a low-level I/O error
-   * @see #readHeader(DataInput)
-   * @lucene.internal
-   */
-  public static Reader getReaderNoHeader(DataInput in, Header header) throws IOException
{
-    return getReaderNoHeader(in, header.format, header.version, header.valueCount, header.bitsPerValue);
-  }
 
   /**
    * Restore a {@link Reader} from a stream.
@@ -943,23 +927,6 @@ public class PackedInts {
         throw new AssertionError("Unknwown format: " + format);
     }
   }
-  
-  /**
-   * Expert: Construct a direct {@link Reader} from an {@link IndexInput} 
-   * without reading metadata at the beginning of the stream. This method is 
-   * useful to restore data when metadata has been previously read using 
-   * {@link #readHeader(DataInput)}.
-   *
-   * @param in           the stream to read data from, positioned at the beginning of the
packed values
-   * @param header       metadata result from <code>readHeader()</code>
-   * @return             a Reader
-   * @throws IOException If there is a low-level I/O error
-   * @see #readHeader(DataInput)
-   * @lucene.internal
-   */
-  public static Reader getDirectReaderNoHeader(IndexInput in, Header header) throws IOException
{
-    return getDirectReaderNoHeader(in, header.format, header.version, header.valueCount,
header.bitsPerValue);
-  }
 
   /**
    * Construct a direct {@link Reader} from an {@link IndexInput}. This method
@@ -1216,42 +1183,6 @@ public class PackedInts {
     }
   }
 
-  /**
-   * Expert: reads only the metadata from a stream. This is useful to later
-   * restore a stream or open a direct reader via 
-   * {@link #getReaderNoHeader(DataInput, Header)}
-   * or {@link #getDirectReaderNoHeader(IndexInput, Header)}.
-   * @param    in the stream to read data
-   * @return   packed integer metadata.
-   * @throws   IOException If there is a low-level I/O error
-   * @see #getReaderNoHeader(DataInput, Header)
-   * @see #getDirectReaderNoHeader(IndexInput, Header)
-   */
-  public static Header readHeader(DataInput in) throws IOException {
-    final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_CURRENT);
-    final int bitsPerValue = in.readVInt();
-    assert bitsPerValue > 0 && bitsPerValue <= 64: "bitsPerValue=" + bitsPerValue;
-    final int valueCount = in.readVInt();
-    final Format format = Format.byId(in.readVInt());
-    return new Header(format, valueCount, bitsPerValue, version);
-  }
-  
-  /** Header identifying the structure of a packed integer array. */
-  public static class Header {
-
-    private final Format format;
-    private final int valueCount;
-    private final int bitsPerValue;
-    private final int version;
-
-    public Header(Format format, int valueCount, int bitsPerValue, int version) {
-      this.format = format;
-      this.valueCount = valueCount;
-      this.bitsPerValue = bitsPerValue;
-      this.version = version;
-    }    
-  }
-
   /** Check that the block size is a power of 2, in the right bounds, and return
    *  its log in base 2. */
   static int checkBlockSize(int blockSize, int minBlockSize, int maxBlockSize) {

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/overview.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/overview.html?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/overview.html (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/overview.html Thu Oct 16 13:45:35 2014
@@ -118,7 +118,7 @@ which implements files as memory-residen
 
 <li>
 <b>{@link org.apache.lucene.util}</b>
-contains a few handy data structures and util classes, ie {@link org.apache.lucene.util.OpenBitSet
OpenBitSet}
+contains a few handy data structures and util classes, ie {@link org.apache.lucene.util.FixedBitSet
FixedBitSet}
 and {@link org.apache.lucene.util.PriorityQueue PriorityQueue}.</li>
 </ul>
 To use Lucene, an application should:

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/schema/BoolField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/schema/BoolField.java?rev=1632309&r1=1632308&r2=1632309&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/schema/BoolField.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/schema/BoolField.java
Thu Oct 16 13:45:35 2014
@@ -172,7 +172,7 @@ public class BoolField extends Primitive
   }
 }
 
-// TODO - this can be much more efficient - use OpenBitSet or Bits
+// TODO - this can be much more efficient - use FixedBitSet or Bits
 class BoolFieldSource extends ValueSource {
   protected String field;
 



Mime
View raw message