Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
- OpenSearch: 2.17.1
- Running in GKE
Describe the issue:
When upgrading opensearch from 2.12.0 to 2.17.1, we had the bad surprise of seeing this error message showing up and blocking the upgrade from being successful:
Caused by: org.opensearch.index.mapper.MapperParsingException: Failed to parse mapping [_doc]: Cannot set modelId or method parameters when index.knn setting is false
at org.opensearch.index.mapper.MapperService.internalMerge(MapperService.java:479) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.index.mapper.MapperService.internalMerge(MapperService.java:465) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.index.mapper.MapperService.merge(MapperService.java:451) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.cluster.metadata.MetadataIndexUpgradeService.checkMappingsCompatibility(MetadataIndexUpgradeService.java:248) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.cluster.metadata.MetadataIndexUpgradeService.upgradeIndexMetadata(MetadataIndexUpgradeService.java:121) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.gateway.GatewayMetaState.upgradeMetadata(GatewayMetaState.java:298) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.gateway.GatewayMetaState.upgradeMetadataForNode(GatewayMetaState.java:280) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.gateway.GatewayMetaState.start(GatewayMetaState.java:198) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.node.Node.start(Node.java:1623) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.Bootstrap.start(Bootstrap.java:339) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:413) ~[opensearch-2.17.1.jar:2.17.1]
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:181) ~[opensearch-2.17.1.jar:2.17.1]
The index in question was not created with index.knn
set to “true” and we have one mapping with type “knn_vector”. Now I’m wondering whether or not we need to recreate the index completely with this value set to “true” or if there’s a way around it… We also can’t get rid of the knn vector mapping.
As far as I could see this value can’t be updated so I feel like there’s no other choice but that but at the same time I’m not very well versed in opensearch.
Any feedback will be appreciated, thanks!