Fredrik Skolmli created NIFI-1911:
-------------------------------------
Summary: Fetching Elasticsearch documents where source indexing is
disabled causes NullPointerException
Key: NIFI-1911
URL: https://issues.apache.org/jira/browse/NIFI-1911
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 0.6.1
Environment: Ubuntu 16.04 LTS
NiFi 0.6.1
Reporter: Fredrik Skolmli
Priority: Minor
When fetching documents with the FetchElasticsearch processor (primarily to see
whether or not the document is present), it fails and produces a
java.lang.NullPointerException if the {{_source}} field is disabled. This is
probably because of the empty response since the processor currently does not
have the ability to specify fields.
My ES index have the following settings:
{code}
{
"mappings": {
"test": {
"properties": {
"data": {
"index": "not_analyzed",
"type": "string",
"store": true
}
},
"_source": {
"enabled": false
}
}
}
}
{code}
The document indexed is:
{code}
{'data': "Here's my data"}
{code}
I then created a FetchElasticsearch processor specifying the id manually, which
produces the following error:
{code}
FetchElasticsearch[id=f0ef2fad-3778-4465-bb26-6faa27f5e03e] Failed to read
StandardFlowFileRecord[uuid=1ab9c9a3-aab0-48fa-9beb-2d18d0fdf12c,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1463874100002-287, container=default,
section=287], offset=980935, length=0],offset=0,name=1,size=0] from
Elasticsearch due to null: java.lang.NullPointerException
{code}
Recreating the index with {{_source}} set to {{"enabled":"true"}} produces the
expected result.
Looks like a bug for me, but possibly rather an improvement suggestion to the
processor, which should have a "fields" property.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)