|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A map from term to term indices.
To build document iterators at the base of a compound query, a parser need to know, given a term as a character sequence, which is the corresponding inverted list of the index. A class implementing this interface may be used to this purpose.
A term map must return, given a character sequence, a natural
number. Optionally, it may return -1 if the character sequence was not indexed.
The latter behaviour is not enforced, so that, for example, MinimalPerfectHash
instances may be used when it is known a priori whether a term has been indexed or not.
Optionally, an instance of this class may provide two-way access to terms.
| Method Summary | |
int |
get(CharSequence term)
Returns the index corresponding to the given term, or possibly (but not necessarily) -1 if the term was not indexed. |
CharSequence |
get(int index)
Returns the term corresponding to the given index (optional operation). |
MutableString |
get(int index,
MutableString term)
Writes in the given mutable string the term corresponding to the given index (optional operation). |
| Method Detail |
public int get(CharSequence term)
term - a term.
public CharSequence get(int index)
index - a term index.
null if the term was not indexed.
public MutableString get(int index,
MutableString term)
index - a term index.term - a mutable string that will be fillted with the corresponding term.
term, or possibly (but not necessarily) null if the term was not indexed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||