You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the call to _field_caps (/_field_caps?fields=*) fails silently and responds with
{
"indices": [
"test"
],
"fields": {}
}
but, upon close inspection and debugging, the following error is getting thrown when trying to establish if the rank field is aggregatable:
[elasticsearch] org.elasticsearch.transport.RemoteTransportException: [node-0][127.0.0.1:9300][indices:data/read/field_caps[index][s]]
[elasticsearch] Caused by: java.lang.UnsupportedOperationException: [rank_feature] fields do not support sorting, scripting or aggregating
[elasticsearch] at org.elasticsearch.index.mapper.RankFeatureFieldMapper$RankFeatureFieldType.fielddataBuilder(RankFeatureFieldMapper.java:167) ~[?:?]
[elasticsearch] at org.elasticsearch.index.mapper.MappedFieldType.isAggregatable(MappedFieldType.java:303) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[elasticsearch] at org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesIndexAction.shardOperation(TransportFieldCapabilitiesIndexAction.java:92) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[elasticsearch] at org.elasticsearch.action.fieldcaps.TransportFieldCapabilitiesIndexAction.shardOperation(TransportFieldCapabilitiesIndexAction.java:47) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[elasticsearch] at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$1.doRun(TransportSingleShardAction.java:112) ~[elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[elasticsearch] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:769) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[elasticsearch] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
[elasticsearch] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
[elasticsearch] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
[elasticsearch] at java.lang.Thread.run(Thread.java:834) [?:?]
It seems the fielddataBuilder(String fullyQualifiedIndexName) method throws an UnsupportedOperationException while MappedFieldTypes isAggregatable() method catches an IllegalArgumentException when calling fielddataBuilder(). Should isAggregatable deal with UnsupportedOperationExceptions, as well, or fielddataBuidler should have a different logic?
This is related to #44320 where the above failure makes SQL to be unable to execute a simple query.
The text was updated successfully, but these errors were encountered:
I merged #44370 to address the bug. The solution we went with changed fielddataBuilder to throw IllegalArgumentException to be consistent with the method contract.
FYI I hit this bug after upgrading ELK stack to 7.x, the _field_caps API is used by Kibana to create index patterns. It results in all non-default fields for an index containing a single rank_feature field being stripped from the index pattern and thus not being searchable in Kibana.
For a simple index containing a
rank_feature
field in its mappings:the call to
_field_caps
(/_field_caps?fields=*
) fails silently and responds withbut, upon close inspection and debugging, the following error is getting thrown when trying to establish if the
rank
field is aggregatable:It seems the
fielddataBuilder(String fullyQualifiedIndexName)
method throws anUnsupportedOperationException
whileMappedFieldType
sisAggregatable()
method catches anIllegalArgumentException
when callingfielddataBuilder()
. ShouldisAggregatable
deal withUnsupportedOperationException
s, as well, orfielddataBuidler
should have a different logic?This is related to #44320 where the above failure makes SQL to be unable to execute a simple query.
The text was updated successfully, but these errors were encountered: