Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.7.0
Describe the issue:
I am using Opensearch 2.7.0 and Opensearch dashboards 2.7.0.
I ran fresh Opensearch dashboard without importing anything from previous versions. When I go to saved objects, I get error:
Unable find saved objects
Tracing route of error: this request:
<KIBANA_HOST>/api/opensearch-dashboards/management/saved_objects/_find?perPage=50&page=1&fields=id&type=config&type=url&type=index-pattern&type=query&type=dashboard&type=visualization&type=visualization-visbuilder&type=search&sortField=type
is giving back:
{“statusCode”:400,“error”:“Bad Request”,“message”:“all shards failed: search_phase_execution_exception: [illegal_argument_exception] Reason: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [type] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”}
If I remove the last parameter (sortField=type), then the query goes through correctly.
This is what my .kibana index look like:
"hits" : [
{
"_index" : ".kibana",
"_id" : "config:2.7.0",
"_score" : 1.0,
"_source" : {
"config" : {
"buildNum" : 6100
},
"type" : "config",
"references" : [ ],
"migrationVersion" : {
"config" : "7.9.0"
},
"updated_at" : "2023-05-25T21:04:19.814Z"
}
}
]
Mapping:
{
".kibana" : {
"mappings" : {
"properties" : {
"config" : {
"properties" : {
"buildNum" : {
"type" : "long"
}
}
},
"migrationVersion" : {
"properties" : {
"config" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
"type" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"updated_at" : {
"type" : "date"
}
}
}
}
}
Configuration:
server.host: 0.0.0.0
opensearch.hosts: https://localhost:9200
opensearch.ssl.verificationMode: none
opensearch.username: <>
opensearch.password: <>
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
opensearch.requestHeadersAllowlist: [ authorization,securitytenant ]
opensearch_security.multitenancy.enabled: false
opensearch_security.multitenancy.tenants.enable_global: true
opensearch_security.multitenancy.tenants.enable_private: false
opensearch_security.multitenancy.tenants.preferred: ["Global"]
opensearch_security.multitenancy.enable_filter: true
#can't find replacement from es
#map.includeOpenSearchService: false
logging.dest: logs/kibana_server.log
logging.verbose: false
server.ssl.supportedProtocols: [TLSv1.2]
server.ssl.cipherSuites: [ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384]
opensearch_security.cookie.ttl: 86400000
opensearch_security.session.ttl: 86400000
opensearch_security.session.keepalive: true
opensearch_security.jwt.login_endpoint: /
opensearch_security.auth.type: "jwt"
opensearch_security.jwt.url_param: jwtToken
server.cors: true
server.customResponseHeaders:
Access-Control-Allow-Credentials: "true"
Relevant Logs or Screenshots: