public class DefaultIteratorResultSet extends Object implements IteratorResultSet
Modifier | Constructor and Description |
---|---|
protected |
DefaultIteratorResultSet(IteratorSearchRequest request,
NexusIndexMultiSearcher indexSearcher,
List<IndexingContext> contexts,
org.apache.lucene.search.TopDocs hits) |
Modifier and Type | Method and Description |
---|---|
protected void |
calculateHighlights(IndexingContext context,
org.apache.lucene.document.Document d,
ArtifactInfo ai)
Creates the MatchHighlights and adds them to ArtifactInfo if found/can.
|
protected void |
cleanUp() |
void |
close() |
protected ArtifactInfo |
createNextAi() |
void |
finalize() |
protected List<String> |
getBestFragments(org.apache.lucene.search.Query query,
org.apache.lucene.search.highlight.Formatter formatter,
org.apache.lucene.analysis.TokenStream tokenStream,
String text,
int maxNumFragments) |
protected IndexingContext |
getIndexingContextForPointer(org.apache.lucene.document.Document doc,
int docPtr) |
int |
getTotalProcessedArtifactInfoCount()
Returns the up-to-date number of the actual number of loaded Lucene Documents that were converted into
ArtifactInfo object until last next() invocation.
|
boolean |
hasNext() |
protected List<String> |
highlightField(IndexingContext context,
MatchHighlightRequest hr,
IndexerField field,
String text)
Returns a string that contains match fragment highlighted in style as user requested.
|
Iterator<ArtifactInfo> |
iterator() |
ArtifactInfo |
next() |
void |
remove() |
protected IndexerField |
selectStoredIndexerField(Field field)
Select a STORED IndexerField assigned to passed in Field.
|
protected DefaultIteratorResultSet(IteratorSearchRequest request, NexusIndexMultiSearcher indexSearcher, List<IndexingContext> contexts, org.apache.lucene.search.TopDocs hits) throws IOException
IOException
public boolean hasNext()
hasNext
in interface Iterator<ArtifactInfo>
public ArtifactInfo next()
next
in interface Iterator<ArtifactInfo>
public void remove()
remove
in interface Iterator<ArtifactInfo>
public Iterator<ArtifactInfo> iterator()
iterator
in interface Iterable<ArtifactInfo>
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public int getTotalProcessedArtifactInfoCount()
IteratorResultSet
getTotalProcessedArtifactInfoCount
in interface IteratorResultSet
public void finalize() throws Throwable
protected ArtifactInfo createNextAi() throws IOException
IOException
protected void cleanUp()
protected void calculateHighlights(IndexingContext context, org.apache.lucene.document.Document d, ArtifactInfo ai) throws IOException
context
- d
- ai
- IOException
protected IndexerField selectStoredIndexerField(Field field)
field
- protected List<String> highlightField(IndexingContext context, MatchHighlightRequest hr, IndexerField field, String text) throws IOException
context
- hr
- field
- doc
- IOException
protected final List<String> getBestFragments(org.apache.lucene.search.Query query, org.apache.lucene.search.highlight.Formatter formatter, org.apache.lucene.analysis.TokenStream tokenStream, String text, int maxNumFragments) throws IOException
IOException
protected IndexingContext getIndexingContextForPointer(org.apache.lucene.document.Document doc, int docPtr)
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.