public class StorePruningPolicy extends PruningPolicy
| Modifier and Type | Field and Description |
|---|---|
protected Set<String> |
deleteAll
Fields to be completely deleted
|
protected int |
delFields |
protected Map<String,Integer> |
fieldFlags
Pruning in effect for each field
|
protected org.apache.lucene.index.pruning.StorePruningPolicy.DelFieldSelector |
fs |
protected IndexReader |
in |
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR| Constructor and Description |
|---|
StorePruningPolicy(IndexReader in,
Map<String,Integer> fieldFlags)
Constructs a policy.
|
| Modifier and Type | Method and Description |
|---|---|
FieldInfos |
getFieldInfos(FieldInfos allInfos)
Compute field infos that should be retained
|
Document |
pruneDocument(int doc,
FieldSelector parent)
Prune stored fields of a document.
|
protected org.apache.lucene.index.pruning.StorePruningPolicy.DelFieldSelector fs
protected IndexReader in
protected int delFields
public StorePruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
in - input reader.fieldFlags - a map where keys are field names, and flags are
bitwise-OR values of flags defined in PruningPolicy.public FieldInfos getFieldInfos(FieldInfos allInfos)
allInfos - original field infospublic Document pruneDocument(int doc, FieldSelector parent) throws IOException
getFieldInfos(FieldInfos).doc - document numberparent - original field selector that limits what fields will be
retrieved.IOException