[ 
https://issues.apache.org/jira/browse/NIFI-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623427#comment-17623427
 ] 

Chris Sampson commented on NIFI-3262:
-------------------------------------

FYI, {{routing}} can be set as a [request 
parameter|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk-api-query-params]
 using a dynamic property on the {{PutElasticsearchRecord}} processor, although 
that sets the value for the entire {{_bulk}} operation, not each individual 
document contained within (where one might want to set different routing for 
each document).

{{parent}} hasn't been supported in elasticsearch since [version 
5.x|https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docs-bulk.html#bulk-parent]
 - this is simply a field added to the bulk header, so no need for nifi to 
validate/prevent its use, just that users will need to expect and deal with 
errors returned by elasticsearch if they use the field (or any other that's 
unsupported) with newer versions.

> PutElasticsearch support for _routing/_parent
> ---------------------------------------------
>
>                 Key: NIFI-3262
>                 URL: https://issues.apache.org/jira/browse/NIFI-3262
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Josh Harrison
>            Priority: Major
>
> Due to the structure of the current nifi Elasticsearch indexing processors, 
> it doesn't appear possible to specify explicit _routing or _parent fields 
> when using any of the PutElasticsearch processors (PutElasticsearch, 
> PutElasticsearchHTTP, PutElasticsearch5).
> The ability to optionally specify the _parent and/or _routing parameters that 
> can be present in a normal bulk index request would be really valuable.
> An alternative to adding a handled attribute would be adding support for the 
> bulk indexing syntax as defined on 
> https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
>  - a two line structure where line one contains the indexing instructions in 
> a JSON object, and line two contains the content of the object. Each line 
> ends with an explicit newline character (\n). This would allow bulk indexing, 
> update, delete, etc operations to be carried out through nifi.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to