|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.indexer.entry.BaseEntry com.sun.labs.minion.indexer.entry.CasedEntry com.sun.labs.minion.indexer.entry.CasedIDEntry
public class CasedIDEntry
A class for storing ID only postings for dictionary entries that need to store case sensitive and case insensitive postings. Such entries can be used for bigram dictionaries or for character saved fields that need to be searched case insensitively.
Field Summary | |
---|---|
protected static int |
CI
|
protected static int |
CS
|
Fields inherited from class com.sun.labs.minion.indexer.entry.CasedEntry |
---|
ciEntry, logTag, n, offset, p, size, totalSize |
Fields inherited from class com.sun.labs.minion.indexer.entry.BaseEntry |
---|
dict, id, name, postIn |
Constructor Summary | |
---|---|
CasedIDEntry()
Creates an entry of this type with no name. |
|
CasedIDEntry(java.lang.Object name)
Creates an entry of this type. |
Method Summary | |
---|---|
void |
addCaseInsensitive(Occurrence o)
Adds an occurrence to the case insensitive postings for this entry. |
void |
addCaseSensitive(Occurrence o)
Adds an occurrence to the case sensitive postings for this entry. |
void |
append(QueryEntry qe,
int start,
int[] idMap)
Appends the postings from another entry onto this one. |
void |
decodePostingsInfo(ReadableBuffer b,
int pos)
Decodes the postings information associated with this entry. |
Postings |
getCaseInsensitivePostings()
Gets the postings that are case insenstive. |
Postings |
getCaseSensitivePostings()
Gets the postings that are case sensitive. |
Entry |
getEntry(java.lang.Object name)
Gets a new entry with the given name. |
int |
getMaxFDT()
Returns the maximum frequency encoded in the postings, which is always 1 for ID only postings. |
int |
getN()
Gets the number of postings associated with this entry. |
int |
getNCaseInsensitive()
|
int |
getNumChannels()
Returns the number of channels needed to store the postings for this entry type. |
long |
getTotalOccurrences()
Returns the total number of occurrences for these postings, which is just the number of postings for ID only postings. |
boolean |
hasFieldInformation()
Indicates whether the postings associated with this entry have field information. |
boolean |
hasPositionInformation()
Indicates whether the postings associated with this entry have position information. |
protected void |
init()
Initializes the arrays containing postings, sizes, etc. |
protected void |
initPostings(int pos)
Creates a set of postings for indexing or merging. |
PostingsIterator |
iterator(PostingsIteratorFeatures features)
Gets an iterator that will iterate through a set of postings associated with this entry. |
boolean |
nameOccurred()
Indicates whether the name of this entry actually occurred in the data, that is, whether it has any case sensitive postings. |
void |
readPostings()
Reads the postings data for this entry. |
void |
readPostings(int pos)
Reads the postings data for this entry. |
boolean |
writePostings(PostingsOutput[] out,
int[] idMap)
Writes the postings associated with this entry to some or all of the given channels. |
Methods inherited from class com.sun.labs.minion.indexer.entry.CasedEntry |
---|
add, add, encodePostingsInfo, getCaseInsensitiveEntry, getEntry, setCaseInsensitiveEntry |
Methods inherited from class com.sun.labs.minion.indexer.entry.BaseEntry |
---|
compareTo, getID, getName, getPartition, setDictionary, setID, setName, setPostingsInput, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int CS
protected static final int CI
Constructor Detail |
---|
public CasedIDEntry()
public CasedIDEntry(java.lang.Object name)
name
- The name of the entry.Method Detail |
---|
public Entry getEntry(java.lang.Object name)
Entry
name
- the name that we want to give the entry.
protected void init()
CasedEntry
init
in class CasedEntry
protected void initPostings(int pos)
initPostings
in class CasedEntry
pos
- The position in the array of postings where we'll start
creating postings.public int getNumChannels()
getNumChannels
in interface Entry
getNumChannels
in class CasedEntry
public int getMaxFDT()
public long getTotalOccurrences()
public boolean writePostings(PostingsOutput[] out, int[] idMap) throws java.io.IOException
out
- The outputs to which we will write the postings.idMap
- A map from the IDs currently used in the postings to
the IDs that should be used when the postings are written to disk.
This may be null
, in which case no remapping will
occur.
java.io.IOException
- if there is any error writing the
postings.public void append(QueryEntry qe, int start, int[] idMap)
qe
- The entry that we want to append onto this one.start
- The new starting ID for the partition that the entry
was drawn from.idMap
- A map from old IDs in the given postings to new IDs
with gaps removed for deleted data. If this is null
,
then there are no deleted documents.public void decodePostingsInfo(ReadableBuffer b, int pos)
decodePostingsInfo
in interface QueryEntry
decodePostingsInfo
in class CasedEntry
b
- The buffer containing the encoded postings information.pos
- The position in b
where the postings
information can be found.public void readPostings(int pos) throws java.io.IOException
java.io.IOException
- if there is any error reading the
postings.public void readPostings() throws java.io.IOException
java.io.IOException
- if there is any error reading the
postings.public int getN()
public boolean hasPositionInformation()
QueryEntry
public boolean hasFieldInformation()
QueryEntry
public PostingsIterator iterator(PostingsIteratorFeatures features)
features
- The features that the iterator must support
public void addCaseSensitive(Occurrence o)
o
- The occurrence to add.public void addCaseInsensitive(Occurrence o)
o
- The occurrence to add.public Postings getCaseSensitivePostings()
public Postings getCaseInsensitivePostings()
public boolean nameOccurred()
true
if the name of this entry actually occurred in
the indexed material, false otherwise.
public int getNCaseInsensitive()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |