public class SolrDocumentFetcher extends Object
SolrIndexSearcher
for stored Document related matters
including DocValue substitutions.Modifier and Type | Method and Description |
---|---|
void |
decorateDocValueFields(SolrDocumentBase doc,
int docid,
Set<String> fields)
This will fetch and add the docValues fields to a given SolrDocument/SolrInputDocument
|
Document |
doc(int docId) |
Document |
doc(int i,
Set<String> fields)
Retrieve the
Document instance corresponding to the document id. |
void |
doc(int docId,
StoredFieldVisitor visitor) |
Set<String> |
getAllSingleDV() |
Set<String> |
getAllStored() |
SolrCache<Integer,Document> |
getDocumentCache() |
Set<String> |
getNonStoredDVs(boolean onlyUseDocValuesAsStored)
Returns an unmodifiable set of non-stored docValues field names.
|
Set<String> |
getNonStoredDVsWithoutCopyTargets()
Returns an unmodifiable set of names of non-stored docValues fields, except those that are targets of a copy field.
|
Collection<String> |
getStoredHighlightFieldNames()
Returns a collection of the names of all stored fields which can be highlighted the index reader knows about.
|
boolean |
isLazyFieldLoadingEnabled() |
public boolean isLazyFieldLoadingEnabled()
public Collection<String> getStoredHighlightFieldNames()
public Document doc(int docId) throws IOException
IOException
SolrIndexSearcher.doc(int)
public Document doc(int i, Set<String> fields) throws IOException
Document
instance corresponding to the document id.
NOTE: the document will have all fields accessible, but if a field filter is provided, only the provided fields will be loaded (the remainder will be available lazily).
IOException
SolrIndexSearcher.doc(int, Set)
public void doc(int docId, StoredFieldVisitor visitor) throws IOException
IOException
SolrIndexSearcher.doc(int, StoredFieldVisitor)
public void decorateDocValueFields(SolrDocumentBase doc, int docid, Set<String> fields) throws IOException
doc
- A SolrDocument or SolrInputDocument instance where docValues will be addeddocid
- The lucene docid of the document to be populatedfields
- The list of docValues fields to be decoratedIOException
public Set<String> getNonStoredDVs(boolean onlyUseDocValuesAsStored)
onlyUseDocValuesAsStored
- If false, returns all non-stored docValues. If true, returns only those non-stored docValues which have
the SchemaField.useDocValuesAsStored()
flag true.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.