Package ca.cgjennings.algo
Class TextIndex.Query
- java.lang.Object
-
- ca.cgjennings.algo.TextIndex.Query
-
- Direct Known Subclasses:
TextIndex.And
,TextIndex.Atom
,TextIndex.Not
,TextIndex.Or
- Enclosing class:
- TextIndex
public abstract static class TextIndex.Query extends java.lang.Object
AQuery
represents a query expression to be matched against a text index.
-
-
Constructor Summary
Constructors Constructor Description Query()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>
evaluate(TextIndex ti)
Returns the set of document IDs that satisfy the query in the specified text index.abstract TextIndex.Result
execute(TextIndex ti)
Returns theResult
of performing this query against a specific text index.
-
-
-
Method Detail
-
evaluate
public java.util.Set<java.lang.String> evaluate(TextIndex ti)
Returns the set of document IDs that satisfy the query in the specified text index. This is equivalent to callingexecute( ti ).getResultSet( ti )
- Parameters:
ti
- the text index to query- Returns:
- the set of documents that match the query
-
execute
public abstract TextIndex.Result execute(TextIndex ti)
Returns theResult
of performing this query against a specific text index.- Parameters:
ti
- the text index to query- Returns:
- a result that captures the set of matching documents
- See Also:
evaluate(ca.cgjennings.algo.TextIndex)
-
-