public class SolrUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SolrUtils.Modifier
The modifiers available for Solr atomic updates: SET, ADD, INC, REMOVE, REMOVEREGEX.
|
Constructor and Description |
---|
SolrUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
setField(org.apache.solr.common.SolrInputDocument document,
String fieldname,
Object value,
boolean update)
Add a field and optionally perform a partial update on an existing document, using the default atomic update operation ("set").
|
static void |
setField(org.apache.solr.common.SolrInputDocument document,
String fieldname,
Object value,
boolean update,
SolrUtils.Modifier modifier)
Add a field and optionally perform a partial update if applicable on an existing document.
|
public static void setField(org.apache.solr.common.SolrInputDocument document, String fieldname, Object value, boolean update, SolrUtils.Modifier modifier)
document
- the SolrInputDocument
to add/updatefieldname
- the field name to add/updatevalue
- the value to insert for the field.update
- if true, use Solr atomic update mechanism; otherwise overwrite documentmodifier
- The SolrUtils.Modifier
to use when performing an atomic update (i.e. iff update
is set to true).setField(SolrInputDocument, String, Object, boolean)
public static void setField(org.apache.solr.common.SolrInputDocument document, String fieldname, Object value, boolean update)
document
- the SolrInputDocument
to add/updatefieldname
- the field name to add/updatevalue
- the value to insert for the field.update
- if true, use Solr atomic update mechanism; otherwise overwrite existing documentsetField(SolrInputDocument, String, Object, boolean, Modifier)
,
SolrUtils.Modifier
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.