Package org.apache.solr.response
Class DocsStreamer
- java.lang.Object
- 
- org.apache.solr.response.DocsStreamer
 
- 
- All Implemented Interfaces:
- Iterator<SolrDocument>
 
 public class DocsStreamer extends Object implements Iterator<SolrDocument> This streams SolrDocuments from a DocList and applies transformer
- 
- 
Field SummaryFields Modifier and Type Field Description static Set<Class<? extends FieldType>>KNOWN_TYPES
 - 
Constructor SummaryConstructors Constructor Description DocsStreamer(ResultContext rctx)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SolrDocumentconvertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema)Deprecated.use the 3 arg version for better performancestatic SolrDocumentconvertLuceneDocToSolrDoc(org.apache.lucene.document.Document doc, IndexSchema schema, ReturnFields fields)Converts the specifiedDocumentinto aSolrDocument.intcurrentIndex()static ObjectgetValue(SchemaField sf, org.apache.lucene.index.IndexableField f)booleanhasNext()SolrDocumentnext()voidremove()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.util.IteratorforEachRemaining
 
- 
 
- 
- 
- 
Constructor Detail- 
DocsStreamerpublic DocsStreamer(ResultContext rctx) 
 
- 
 - 
Method Detail- 
currentIndexpublic int currentIndex() 
 - 
hasNextpublic boolean hasNext() - Specified by:
- hasNextin interface- Iterator<SolrDocument>
 
 - 
nextpublic SolrDocument next() - Specified by:
- nextin interface- Iterator<SolrDocument>
 
 - 
convertLuceneDocToSolrDoc@Deprecated public static 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
 - 
convertLuceneDocToSolrDocpublic static 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 null
- schema-- IndexSchemacontaining the field/fieldType details for the index the- Documentcame 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
 
 - 
removepublic void remove() - Specified by:
- removein interface- Iterator<SolrDocument>
 
 - 
getValuepublic static Object getValue(SchemaField sf, org.apache.lucene.index.IndexableField f) 
 
- 
 
-