public class SearchResultIterator extends Object implements net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>
SequenceIterator.
Sort criteria are translated into Lucene SortFields: relevance score, intrinsic document order, and
field-value orderings are supported.| Modifier and Type | Field and Description |
|---|---|
static MissingStringLastComparatorSource |
MISSING_LAST |
| Modifier | Constructor and Description |
|---|---|
|
SearchResultIterator(Evaluator eval,
org.apache.lucene.search.Query query,
String sortCriteria,
int start)
Executes a Lucene search.
|
protected |
SearchResultIterator(LuxSearcher searcher,
CachingDocReader docReader,
QueryStats stats,
org.apache.lucene.search.Query query,
String sortCriteria,
int start) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
advanceTo(int startPosition)
advance the iterator to (just before) the given (1-based) position.
|
void |
close()
does nothing
|
net.sf.saxon.om.NodeInfo |
current() |
net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo> |
getAnother() |
int |
getProperties()
This iterator has no special properties
|
net.sf.saxon.om.NodeInfo |
next() |
int |
position() |
public static final MissingStringLastComparatorSource MISSING_LAST
public SearchResultIterator(Evaluator eval, org.apache.lucene.search.Query query, String sortCriteria, int start) 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).start - IOExceptionprotected SearchResultIterator(LuxSearcher searcher, CachingDocReader docReader, QueryStats stats, org.apache.lucene.search.Query query, String sortCriteria, int start) throws IOException
IOExceptionpublic net.sf.saxon.om.NodeInfo next()
throws net.sf.saxon.trans.XPathException
next in interface net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>net.sf.saxon.trans.XPathException - if there is an error while searchingprotected void advanceTo(int startPosition)
throws IOException
startPosition - IOExceptionpublic net.sf.saxon.om.NodeInfo current()
current in interface net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>public int position()
position in interface net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>public void close()
close in interface net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>public net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo> getAnother()
throws net.sf.saxon.trans.XPathException
getAnother in interface net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>net.sf.saxon.trans.XPathExceptionpublic int getProperties()
getProperties in interface net.sf.saxon.om.SequenceIterator<net.sf.saxon.om.NodeInfo>Copyright © 2013. All Rights Reserved.