Configurando analyzers para um index

From Basef
Jump to: navigation, search

Segue abaixo exemplo:

PUT /catalogo
 
{
  "settings": {
    "index": {
      "number_of_shards": 3,
      "number_of_replicas": 0
    }
  },
  "mappings": {
    "pessoas_v2": {
      "_all": {
        "type": "string",
        "index": "analyzed",
        "analyzer": "portuguese"
      },
      "properties": {
        "cidade": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "estado": {
          "type": "string"
        },
        "formação": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "interesses": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "nome": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "país": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        }
      }
    }
  }
}