Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
0.6.1
-
None
-
None
-
Ubuntu 16.04 LTS
NiFi 0.6.1
Description
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:
{ "mappings": { "test": { "properties": { "data": { "index": "not_analyzed", "type": "string", "store": true } }, "_source": { "enabled": false } } } }
The document indexed is:
{'data': "Here's my data"}
I then created a FetchElasticsearch processor specifying the id manually, which produces the following error:
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
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.