

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface ResultSet
A class that holds the results of a search.
Method Summary  

java.util.Set<ResultsCluster> 
cluster(int k)
Clusters the results into this set into a number of clusters. 
java.util.Set<ResultsCluster> 
cluster(java.lang.String field,
int k)
Clusters the results into this set into a number of clusters. 
ResultSet 
difference(ResultSet rs)
Computes the difference of this result set and another result set. 
java.util.List<Result> 
getAllResults(boolean sorted)
Gets all of the query results in the set. 
java.util.List<Result> 
getAllResults(boolean sorted,
ResultsFilter rf)
Gets all of the query results in the set. 
SearchEngine 
getEngine()
Gets the search engine that generated this result set. 
int 
getNumDocs()
Gets the number of documents that are in the whole index. 
QueryStats 
getQueryStats()
Gets the statistics for the query that generated this set. 
long 
getQueryTime()
Gets the amount of time that it took to evaluate the query, in milliseconds. 
java.util.List<Result> 
getResults(int start,
int n)
Gets a subset of the query results stored in this set. 
java.util.List<Result> 
getResults(int start,
int n,
ResultsFilter rf)
Gets a subset of the query results stored in this set. 
java.util.Set<ResultsCluster> 
groupBy(java.lang.String field,
boolean ignoreCase)
Groups the results in this set into a number of clusters. 
ResultSet 
intersect(ResultSet rs)
Computes the intersection of this result set with another result set. 
boolean 
querySyntaxError()
Indicates whether the query contained a syntax error. 
void 
setResultsFilter(ResultsFilter rf)
Sets the results filter that will be used to decide whether results should be returned from this set. 
void 
setScoreModifier(ScoreModifier sm)
Sets the score modifier that will be used to modify the scores of the documents returned from this set. 
void 
setSortSpec(java.lang.String sortSpec)
Sets the sorting specification used by this result set. 
int 
size()
Gets the size of the results set, that is, the number of documents that matched the query. 
ResultSet 
union(ResultSet rs)
Computes the intersection of this result set with another result set. 
ResultSet 
weight(float w)
Weights the results in this set. 
Method Detail 

SearchEngine getEngine()
void setSortSpec(java.lang.String sortSpec)
sortSpec
 a sorting specification for this result set.void setResultsFilter(ResultsFilter rf)
rf
 the results filter to useResultsFilter
,
CompositeResultsFilter
void setScoreModifier(ScoreModifier sm)
sm
 the score modifier to usejava.util.List<Result> getResults(int start, int n) throws SearchEngineException
start
 The position in the set to start getting results,
indexed from 0.n
 The number of results to get. Note that you may get less
than this number of results if there are insufficient results in the
set.
Result
instances containing the
search results.
SearchEngineException
 if there is some error getting the
results.java.util.List<Result> getResults(int start, int n, ResultsFilter rf) throws SearchEngineException
start
 The position in the set to start getting results,
indexed from 0.n
 The number of results to get. Note that you may get less
than this number of results if there are insufficient results in the
set.rf
 a filter to apply against candidate results
Result
instances containing the
search results.
SearchEngineException
 if there is some error getting the
results.java.util.List<Result> getAllResults(boolean sorted) throws SearchEngineException
sorted
 If true
, then the results will be sorted
according to the sorting specification that was provided with the
query. If false
, then the results will be returned in
an arbitrary order.
SearchEngineException
 if there is any error processing the result setjava.util.List<Result> getAllResults(boolean sorted, ResultsFilter rf) throws SearchEngineException
sorted
 If true
, then the results will be sorted
according to the sorting specification that was provided with the
query. If false
, then the results will be returned in
an arbitrary order.rf
 a filter to apply against candidate results
SearchEngineException
 if there is any error processing the result setQueryStats getQueryStats()
ResultSet weight(float w)
w
 a weight to apply multiplicatively to each of the scores in
this set.
ResultSet intersect(ResultSet rs)
rs
 the result set with which this set will be intersected.
ResultSet union(ResultSet rs)
rs
 the result set with which this set will be intersected.
ResultSet difference(ResultSet rs)
rs
 the result set with which this set will be intersected.
boolean querySyntaxError()
true
if there was such an error,
false
otherwise.int size()
querySyntaxError()
int getNumDocs()
long getQueryTime()
java.util.Set<ResultsCluster> cluster(int k) throws SearchEngineException
k
 the maximum number of clusters to return
k
SearchEngineException
 if there are any errors generating the clustersResultsCluster
java.util.Set<ResultsCluster> cluster(java.lang.String field, int k) throws SearchEngineException
field
 the name of a vectored field upon which the clustering
should be based. A value of null
indicates that all vectored
fields should be considered, while an empty string indicates that data
in no explicit field should be considered.k
 the maximum number of clusters to return
k
SearchEngineException
 if there are any errors generating the clustersResultsCluster
java.util.Set<ResultsCluster> groupBy(java.lang.String field, boolean ignoreCase) throws SearchEngineException
field
 the name of the field for which we wish to group the resultsignoreCase
 if true
case will not be taken into account when
grouping the results. Clearly, this only makes sense for string fields.
SearchEngineException
 if there are any errors grouping the
results


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 