Package org.apache.solr.response
Class DocsStreamer
- java.lang.Object
-
- org.apache.solr.response.DocsStreamer
-
-
Field Summary
Fields Modifier and Type Field Description static Set<Class<? extends FieldType>>
KNOWN_TYPES
-
Constructor Summary
Constructors Constructor Description DocsStreamer(ResultContext rctx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.apache.solr.common.SolrDocument
convertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema)
Deprecated.use the 3 arg version for better performancestatic org.apache.solr.common.SolrDocument
convertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema, ReturnFields fields)
Converts the specifiedDocument
into aSolrDocument
.int
currentIndex()
static Object
getValue(SchemaField sf, org.apache.lucene.index.IndexableField f)
boolean
hasNext()
org.apache.solr.common.SolrDocument
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
DocsStreamer
public DocsStreamer(ResultContext rctx)
-
-
Method Detail
-
currentIndex
public int currentIndex()
-
hasNext
public boolean hasNext()
-
next
public org.apache.solr.common.SolrDocument next()
-
convertLuceneDocToSolrDoc
@Deprecated public static org.apache.solr.common.SolrDocument convertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema)
Deprecated.use the 3 arg version for better performanceThis method is less efficient then the 3 arg version because it may convert some fields that are not needed
-
convertLuceneDocToSolrDoc
public static org.apache.solr.common.SolrDocument convertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema, ReturnFields fields)
Converts the specifiedDocument
into aSolrDocument
.The use of
ReturnFields
can be important even when it was already used to retrieve theDocument
fromSolrDocumentFetcher
because the Document may have been cached with more fields then are desired.- Parameters:
doc
-Document
to be converted, must not be nullschema
-IndexSchema
containing the field/fieldType details for the index theDocument
came from, must not be null.fields
-ReturnFields
instance that can be use to limit the set of fields that will be converted, must not be null
-
remove
public void remove()
-
getValue
public static Object getValue(SchemaField sf, org.apache.lucene.index.IndexableField f)
-
-