Hey,
I noticed the following exception in the Elasticsearch logs
[2019-06-27T13:05:54,761][DEBUG][o.e.a.f.TransportFieldCapabilitiesIndexAction] [mpps-st-elastic-1] null: failed to execute [org.elasticsearch.action.fieldcaps.FieldCapabilitiesIndexRequest@37bdc2bd]
org.elasticsearch.transport.RemoteTransportException: [mpps-st-elastic-1][10.99.99.34:9300][indices:data/read/field_caps[index][s]]
Caused by: java.lang.NullPointerException
at org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesIndexAction.shardOperation(TransportFieldCapabilitiesIndexAction.java:105) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesIndexAction.shardOperation(TransportFieldCapabilitiesIndexAction.java:46) ~[elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:115) [elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:751) [elasticsearch-6.7.2.jar:6.7.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.7.2.jar:6.7.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
This exception appears in the Elasticsearch logs when trying to add in a kibana index pattern.
And i can see only meta fields
Definition of the index:
DELETE /test02
PUT test02
{
"mappings": {
"properties": {
"app_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
},
"prefix_app_name": {
"type": "text",
"index_prefixes": {
"min_chars": 1,
"max_chars": 19
}
}
}
}
}
}
}
POST /test02/_doc
{
"app_name":"my super app1"
}
I suspect that the reason for the problems is using index_prefixes
.
When I create an index patter for an analogical index (test01), but without index_prefixes, the problem does not appear.
DELETE /test01
PUT test01
{
"mappings": {
"properties": {
"app_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
POST /test01/_doc
{
"app_name":"my super app1"
}
And I can see all fields
I tested this on Elasticsearch 6.7.2, Kibana 6.7.2 and on Elasticsearch 6.8.0, Kibana 6.8.0.