public class SolrUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SolrUtils.Modifier
The modifiers available for Solr atomic updates
|
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 update, 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 update if applicable.
|
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 overwritemodifier
- The SolrUtils.Modifier
to use for updating a document (only used if update
is 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 overwritesetField(SolrInputDocument, String, Object, boolean, Modifier)
Copyright © 2007–2016 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.