public class AddField extends Rule
| Constructor and Description |
|---|
AddField(String fieldName)
Creates a rule to add a field with no initial value
|
AddField(String fieldName,
String value)
Creates a rule to add a field with the specified name and initial value
|
| Modifier and Type | Method and Description |
|---|---|
void |
run(Reader in,
Writer out)
Adds a single field to a Solr document
|
void |
setValue(String value)
Sets the value of the field
|
public AddField(String fieldName)
fieldName - Field namepublic void setValue(String value)
value - Field valuepublic void run(Reader in, Writer out) throws RuleException
run in class Rulein - Solr documentout - Solr document with added fieldRuleExceptionCopyright © 2009-2013. All Rights Reserved.