public class PostingsListDocSortedPositionalPForDelta extends Object implements PostingsList
Modifier and Type | Class and Description |
---|---|
static class |
PostingsListDocSortedPositionalPForDelta.DocListComparator |
static class |
PostingsListDocSortedPositionalPForDelta.PostingsReader
PostingsReader for PostingsListDocSortedPositionalPForDelta . |
Constructor and Description |
---|
PostingsListDocSortedPositionalPForDelta() |
Modifier and Type | Method and Description |
---|---|
void |
add(int docno,
short tf,
TermPositions pos)
Adds a posting to this postings list.
|
void |
clear()
Clears this postings list.
|
static PostingsListDocSortedPositionalPForDelta |
create(byte[] bytes) |
static PostingsListDocSortedPositionalPForDelta |
create(DataInput in) |
long |
getCf()
Returns the collection frequency of the term associated with this
postings list.
|
int |
getCollectionDocumentCount()
Returns the number of documents in this collection.
|
int |
getDf()
Returns the document frequency of the term associated with this postings
list.
|
int |
getNumberOfPostings()
Returns the number of postings that will be added to this list.
|
PostingsListDocSortedPositionalPForDelta.PostingsReader |
getPostingsReader()
Returns the
PostingsReader associated with this postings list. |
byte[] |
getRawBytes()
Returns the raw byte array representation of this postings list.
|
static PostingsListDocSortedPositionalPForDelta |
merge(PostingsListDocSortedPositionalPForDelta plist1,
PostingsListDocSortedPositionalPForDelta plist2,
int docs) |
static PostingsListDocSortedPositionalPForDelta |
merge(PostingsList plist1,
PostingsList plist2,
int docs) |
static void |
mergeList(PostingsList newPostings,
List<PostingsList> list,
int nCollDocs) |
void |
readFields(DataInput in) |
byte[] |
serialize() |
void |
setCf(long cf) |
void |
setCollectionDocumentCount(int docs)
Sets the number of documents in this collection.
|
void |
setDf(int df) |
void |
setNumberOfPostings(int n)
Sets the number of postings that will be added to this list.
|
int |
size()
Returns the number of postings that have been added to this postings
list.
|
void |
write(DataOutput out) |
public PostingsListDocSortedPositionalPForDelta()
public void add(int docno, short tf, TermPositions pos)
PostingsList
add
in interface PostingsList
docno
- docno of the postingtf
- score of the postingpos
- positional information (optional)public void clear()
PostingsList
clear
in interface PostingsList
public static PostingsListDocSortedPositionalPForDelta create(byte[] bytes) throws IOException
IOException
public static PostingsListDocSortedPositionalPForDelta create(DataInput in) throws IOException
IOException
public long getCf()
PostingsList
getCf
in interface PostingsList
public int getCollectionDocumentCount()
PostingsList
getCollectionDocumentCount
in interface PostingsList
public int getDf()
PostingsList
PostingsList.getNumberOfPostings()
because of document partitioning for large collections. In these cases,
this method should return the global document frequency, whereas
PostingsList.getNumberOfPostings()
should return the document frequency in
this partition. In a collection with only a single partition, this
is exactly the same value as PostingsList.getNumberOfPostings()
. This method
is not meaningful for impact-sorted indexes.getDf
in interface PostingsList
public int getNumberOfPostings()
PostingsList
PostingsList.setNumberOfPostings(int)
.
Note that under most circumstances this method will return a different
value than PostingsList.size()
, which returns the number of postings that
have already been added.getNumberOfPostings
in interface PostingsList
public PostingsListDocSortedPositionalPForDelta.PostingsReader getPostingsReader()
PostingsList
PostingsReader
associated with this postings list.getPostingsReader
in interface PostingsList
public byte[] getRawBytes()
PostingsList
getRawBytes
in interface PostingsList
public static PostingsListDocSortedPositionalPForDelta merge(PostingsListDocSortedPositionalPForDelta plist1, PostingsListDocSortedPositionalPForDelta plist2, int docs)
public static PostingsListDocSortedPositionalPForDelta merge(PostingsList plist1, PostingsList plist2, int docs)
public static void mergeList(PostingsList newPostings, List<PostingsList> list, int nCollDocs)
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
IOException
public byte[] serialize() throws IOException
serialize
in interface PostingsList
IOException
public void setCf(long cf)
setCf
in interface PostingsList
public void setCollectionDocumentCount(int docs)
PostingsList
setCollectionDocumentCount
in interface PostingsList
public void setDf(int df)
setDf
in interface PostingsList
public void setNumberOfPostings(int n)
PostingsList
setNumberOfPostings
in interface PostingsList
public int size()
PostingsList
PostingsList.getNumberOfPostings()
, which returns the
number of postings that will eventually be added (required for certain
encoding schemes).size
in interface PostingsList
public void write(DataOutput out) throws IOException
write
in interface Writable
IOException