public class SortedIntDocSet extends DocSetBase
SortedIntDocSet represents a sorted set of Lucene Document Ids.| Modifier and Type | Field and Description |
|---|---|
protected int[] |
docs |
static SortedIntDocSet |
zero |
static int[] |
zeroInts |
| Constructor and Description |
|---|
SortedIntDocSet(int[] docs) |
SortedIntDocSet(int[] docs,
int len) |
| Modifier and Type | Method and Description |
|---|---|
DocSet |
andNot(DocSet other)
Returns the documents in this set that are not in the other set.
|
static int |
andNot(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
puts the intersection of a and not b into the target array and returns the size
|
protected static int |
andNotBinarySearch(int[] a,
int lena,
int[] b,
int lenb,
int[] target) |
boolean |
exists(int doc)
Returns true if a document is in the DocSet.
|
static int |
findIndex(int[] arr,
int value,
int low,
int high) |
static int |
firstNonSorted(int[] arr,
int offset,
int len)
Returns the index of the first non-sorted element or -1 if they are all sorted
|
org.apache.lucene.util.OpenBitSet |
getBits()
Inefficient base implementation.
|
int[] |
getDocs() |
org.apache.lucene.search.Filter |
getTopFilter()
Returns a Filter for use in Lucene search methods, assuming this DocSet
was generated from the top-level MultiReader that the Lucene search
methods will be invoked with.
|
DocSet |
intersection(DocSet other)
Returns the intersection of this set with another set.
|
static int |
intersection(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
puts the intersection of a and b into the target array and returns the size
|
protected static int |
intersectionBinarySearch(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
Puts the intersection of a and b into the target array and returns the size.
|
int |
intersectionSize(DocSet other)
Returns the number of documents of the intersection of this set with another set.
|
static int |
intersectionSize(int[] smallerSortedList,
int[] biggerSortedList) |
DocIterator |
iterator()
Returns an iterator that may be used to iterate over all of the documents in the set.
|
long |
memSize()
Returns the approximate amount of memory taken by this DocSet.
|
static int[] |
shrink(int[] arr,
int newSize) |
int |
size()
Returns the number of documents in the set.
|
add, addUnique, andNotSize, equals, union, unionSizeprotected final int[] docs
public static int[] zeroInts
public static SortedIntDocSet zero
public SortedIntDocSet(int[] docs)
docs - Sorted list of idspublic SortedIntDocSet(int[] docs,
int len)
docs - Sorted list of idslen - Number of ids in the listpublic int[] getDocs()
public int size()
DocSetpublic long memSize()
DocSetpublic static int[] shrink(int[] arr,
int newSize)
public static int firstNonSorted(int[] arr,
int offset,
int len)
public static int intersectionSize(int[] smallerSortedList,
int[] biggerSortedList)
public int intersectionSize(DocSet other)
DocSetintersectionSize in interface DocSetintersectionSize in class DocSetBasepublic static int intersection(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
protected static int intersectionBinarySearch(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
public DocSet intersection(DocSet other)
DocSetintersection in interface DocSetintersection in class DocSetBaseprotected static int andNotBinarySearch(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
public static int andNot(int[] a,
int lena,
int[] b,
int lenb,
int[] target)
public DocSet andNot(DocSet other)
DocSetandNot in interface DocSetandNot in class DocSetBasepublic boolean exists(int doc)
DocSetpublic DocIterator iterator()
DocSetThe order of the documents returned by this iterator is non-deterministic, and any scoring information is meaningless
public org.apache.lucene.util.OpenBitSet getBits()
DocSetBasegetBits in interface DocSetgetBits in class DocSetBaseBitDocSet.getBits()public static int findIndex(int[] arr,
int value,
int low,
int high)
public org.apache.lucene.search.Filter getTopFilter()
DocSetgetTopFilter in interface DocSetgetTopFilter in class DocSetBase