@CapabilityDescription(value="Lookup a string value from Elasticsearch Server associated with the specified document ID. The coordinates that are passed to the lookup must contain the key \'id\'.") @Tags(value={"lookup","enrich","value","key","elasticsearch"}) public class ElasticSearchStringLookupService extends AbstractControllerService implements StringLookupService
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
CLIENT_SERVICE |
private static List<PropertyDescriptor> |
DESCRIPTORS |
private ElasticSearchClientService |
esClient |
static String |
ID |
private String |
index |
static PropertyDescriptor |
INDEX |
private static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
private String |
type |
static PropertyDescriptor |
TYPE |
| Constructor and Description |
|---|
ElasticSearchStringLookupService() |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getRequiredKeys() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
Optional<String> |
lookup(Map<String,Object> coordinates) |
void |
onEnabled(ConfigurationContext context) |
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledcustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValueTypelookupinitializegetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor CLIENT_SERVICE
public static final PropertyDescriptor INDEX
public static final PropertyDescriptor TYPE
private static final List<PropertyDescriptor> DESCRIPTORS
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
public static final String ID
private ElasticSearchClientService esClient
private String index
private String type
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponent@OnEnabled public void onEnabled(ConfigurationContext context)
public Optional<String> lookup(Map<String,Object> coordinates) throws LookupFailureException
lookup in interface LookupService<String>LookupFailureExceptionpublic Set<String> getRequiredKeys()
getRequiredKeys in interface LookupService<String>Copyright © 2021 Apache NiFi Project. All rights reserved.