Can we index only few fields in an OpenSearch document?

0

We have around 200 fields in an OpenSearch index but we run queries only on few columns, can we remove the unnecessary columns from indexing and keep only the necessary ones?

Sarath
feita há um ano292 visualizações
1 Resposta
0

Yes, you can use the "index" option controls to decide if fields are indexed. It accepts true or false with defaults being "true". Fields that are not indexed are typically not queryable. e.g:

PUT /<index-name>
{
  "mappings": {
    "properties": {
      "field1": {
        "type": "text",
        "index": false
      }
    }
  }
}
AWS
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas