Package org.apache.solr.response
Class DocsStreamer
java.lang.Object
org.apache.solr.response.DocsStreamer
- All Implemented Interfaces:
Iterator<org.apache.solr.common.SolrDocument>
This streams SolrDocuments from a DocList and applies transformer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.solr.common.SolrDocumentconvertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema) Deprecated.use the 3 arg version for better performancestatic org.apache.solr.common.SolrDocumentconvertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema, ReturnFields fields) Converts the specifiedDocumentinto aSolrDocument.intstatic ObjectgetValue(SchemaField sf, org.apache.lucene.index.IndexableField f) booleanhasNext()org.apache.solr.common.SolrDocumentnext()voidremove()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
KNOWN_TYPES
-
-
Constructor Details
-
DocsStreamer
-
-
Method Details
-
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- See Also:
-
convertLuceneDocToSolrDoc
public static org.apache.solr.common.SolrDocument convertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema, ReturnFields fields) Converts the specifiedDocumentinto aSolrDocument.The use of
ReturnFieldscan be important even when it was already used to retrieve theDocumentfromSolrDocumentFetcherbecause the Document may have been cached with more fields then are desired.- Parameters:
doc-Documentto be converted, must not be nullschema-IndexSchemacontaining the field/fieldType details for the index theDocumentcame from, must not be null.fields-ReturnFieldsinstance that can be use to limit the set of fields that will be converted, must not be null
-
remove
public void remove() -
getValue
-