public class TemplateUpdateProcessorFactory extends SimpleUpdateProcessorFactory
The format of the parameter is <field-name>:<the-template-string>, for example:
Template.field=fname:${somefield}some_string${someotherfield}
Modifier and Type | Class and Description |
---|---|
static class |
TemplateUpdateProcessorFactory.Resolved |
UpdateRequestProcessorFactory.RunAlways
Modifier and Type | Field and Description |
---|---|
static Pattern |
BRACES_PLACEHOLDER_PATTERN |
static Pattern |
DOLLAR_BRACES_PLACEHOLDER_PATTERN |
static String |
NAME |
initArgs
Constructor and Description |
---|
TemplateUpdateProcessorFactory() |
Modifier and Type | Method and Description |
---|---|
protected String |
getMyName() |
static TemplateUpdateProcessorFactory.Resolved |
getResolved(String template,
Cache<String,TemplateUpdateProcessorFactory.Resolved> cache,
Pattern pattern) |
static List<String> |
getVariables(String template,
Cache<String,TemplateUpdateProcessorFactory.Resolved> cache,
Pattern pattern)
Get a list of variables embedded in the template string.
|
protected void |
process(AddUpdateCommand cmd,
SolrQueryRequest req,
SolrQueryResponse rsp)
This object is reused across requests.
|
static String |
replaceTokens(String template,
Cache<String,TemplateUpdateProcessorFactory.Resolved> cache,
Function<String,Object> fun,
Pattern pattern) |
getInstance, getParam, getParams, init
public static final String NAME
public static final Pattern DOLLAR_BRACES_PLACEHOLDER_PATTERN
public static final Pattern BRACES_PLACEHOLDER_PATTERN
protected void process(AddUpdateCommand cmd, SolrQueryRequest req, SolrQueryResponse rsp)
SimpleUpdateProcessorFactory
process
in class SimpleUpdateProcessorFactory
protected String getMyName()
getMyName
in class SimpleUpdateProcessorFactory
public static TemplateUpdateProcessorFactory.Resolved getResolved(String template, Cache<String,TemplateUpdateProcessorFactory.Resolved> cache, Pattern pattern)
public static List<String> getVariables(String template, Cache<String,TemplateUpdateProcessorFactory.Resolved> cache, Pattern pattern)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.