|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.retrieval.QueryElement
com.sun.labs.minion.retrieval.QueryTerm
com.sun.labs.minion.retrieval.DictTerm
public class DictTerm
A concrete subclass of QueryTerm that represents a term
taken from one of the main dictionaries for a partition. Note that a
term can be represented by several actual dictionary entries.
This class implements Comparator so that we can sort the
terms based on their frequency.
| Field Summary | |
|---|---|
protected QueryEntry[] |
dictEntries
The list of entries that were pulled from the dictionary for the current partition. |
protected PostingsIteratorFeatures |
feat
|
protected java.lang.String[] |
knowledgeVariants
The set of morphological variations of the term as computed by the lightweight morphology. |
protected static java.lang.String |
logTag
|
protected PosPostingsIterator[] |
pis
A set of postings iterators for the terms that can be used to get position info for proximity queries or for highlighting. |
protected int[][] |
posns
An array that will hold per-field word positions. |
protected java.lang.String[] |
semanticVariants
The array of semantic variantions of the term as returned from the taxonomies of all the partitions. |
| Fields inherited from class com.sun.labs.minion.retrieval.QueryTerm |
|---|
doExpand, doMorph, doStem, doWild, loadPositions, matchCase, val |
| Fields inherited from class com.sun.labs.minion.retrieval.QueryElement |
|---|
estSize, fieldMultipliers, inOrder, keepPositions, order, part, qc, qs, searchFieldNames, searchFields, strictEval, wc, wf |
| Constructor Summary | |
|---|---|
DictTerm(java.lang.String val)
Creates a dictionary term for a given query term. |
|
| Method Summary | |
|---|---|
protected int |
calculateEstimatedSize()
Returns the already calculated estimated size. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two terms by their respective term frequencies. |
boolean |
equals(java.lang.Object object)
Compares this comparator with another. |
ArrayGroup |
eval(ArrayGroup ag)
Evaluates the term in the current partition. |
java.lang.String |
getName()
|
int[][] |
getPositions(int d)
Gets the positions for this term in the given document. |
java.util.List |
getQueryTerms(java.util.Comparator c)
Returns a list of all the regular terms in this query in the order that they appeared in the query. |
QueryEntry[] |
getTerms()
|
protected ArrayGroup |
intersect(ArrayGroup ag)
Intersects a strict group with the current term. |
protected ArrayGroup |
intersect(NegativeGroup ag)
Intersects a scored group with the current term. |
protected ArrayGroup |
intersect(ScoredGroup ag)
Intersects a scored group with the current term. |
void |
setPartition(DiskPartition part)
Sets the partition that this term will be operating on. |
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String prefix)
|
| Methods inherited from class com.sun.labs.minion.retrieval.QueryTerm |
|---|
setDoExpand, setDoMorph, setDoStem, setDoWild, setLoadPositions, setMatchCase, setQueryConfig |
| Methods inherited from class com.sun.labs.minion.retrieval.QueryElement |
|---|
addSearchFieldName, compareTo, dump, estimateSize, getInOrder, getOrder, getQueryStats, getQueryTerms, getSearchFieldNames, setInOrder, setOrder, setQueryStats, setSearchFields, setWeightingComponents, setWeightingFunction |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String[] knowledgeVariants
protected java.lang.String[] semanticVariants
protected QueryEntry[] dictEntries
protected PostingsIteratorFeatures feat
protected PosPostingsIterator[] pis
protected int[][] posns
protected static java.lang.String logTag
| Constructor Detail |
|---|
public DictTerm(java.lang.String val)
val - The value from the query.| Method Detail |
|---|
public void setPartition(DiskPartition part)
setPartition in class QueryElementpart - The partition that we will be evaluating against.protected int calculateEstimatedSize()
calculateEstimatedSize in class QueryElementpublic ArrayGroup eval(ArrayGroup ag)
eval in class QueryTermag - An array group that we can use to limit the evaluation of
the term. If this group is null a new group will be
returned. If this group is non-null, then the elements
in the group will be used to restrict the documents that we return
from the term.
ArrayGroup containing the results of
evaluating the term against the given group. The static type of the
returned group depends on the query status parameter.protected ArrayGroup intersect(ArrayGroup ag)
ag - The group to intersect with.
protected ArrayGroup intersect(ScoredGroup ag)
ag - The group to intersect with.protected ArrayGroup intersect(NegativeGroup ag)
ag - The group to intersect with.public int[][] getPositions(int d)
public boolean equals(java.lang.Object object)
equals in interface java.util.Comparatorequals in class java.lang.Objectobject - an Object to compare against.
true if this comparator is the same class as
the other, false otherwise.
public int compare(java.lang.Object o1,
java.lang.Object o2)
compare in interface java.util.Comparatoro1 - a term.o2 - another term.
public java.util.List getQueryTerms(java.util.Comparator c)
QueryElement
getQueryTerms in class QueryElementc - A comparator used to order the terms.public QueryEntry[] getTerms()
public java.lang.String getName()
public java.lang.String toString()
toString in class QueryElementpublic java.lang.String toString(java.lang.String prefix)
toString in class QueryTerm
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||