public class SearchResultIterator extends SearchIteratorBase
SequenceIterator.
Sort criteria are translated into Lucene SortFields: relevance score, intrinsic document order, and
field-value orderings are supported.current, eval, MISSING_LAST, position, sortCriteria, start, stats| Constructor and Description |
|---|
SearchResultIterator(Evaluator eval,
org.apache.lucene.search.Query query,
String[] sortCriteria,
int start1)
Executes a Lucene search.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
advanceTo(int startPosition)
advance the iterator to (just before) the given (1-based) position.
|
net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo> |
getAnother() |
net.sf.saxon.om.NodeInfo |
next() |
close, current, getProperties, makeSortFromCriteria, positionpublic SearchResultIterator(Evaluator eval, org.apache.lucene.search.Query query, String[] sortCriteria, int start1) throws IOException
eval - provides the link to the index via its IndexSearcher.query - the query to executesortCriteria - sort criteria, formatted as a comma-separated list of sort field names;
each name may be followed by ascending|descending, and/or by "empty greatest"|"empty least".
The default is "ascending empty least".
The sort criteria are Lucene field names, or may be the special name "lux:score", which selects
relevance score ranking, which is always sorted in descending order: modifiers on relevance orders are ignored.
If no ordering is provided, results are returned in intrinsic document order (ie ordered by document ID).start1 - the 1-based starting position of the iterationIOExceptionpublic net.sf.saxon.om.NodeInfo next()
throws net.sf.saxon.trans.XPathException
net.sf.saxon.trans.XPathException - if there is an error while searchingprotected void advanceTo(int startPosition)
throws IOException
startPosition - IOExceptionpublic net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo> getAnother()
throws net.sf.saxon.trans.XPathException
net.sf.saxon.trans.XPathExceptionCopyright © 2013. All Rights Reserved.