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
demandé il y a un an292 vues
1 réponse
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions