Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Atualizar mapping em index já existente

Tem como eu realizar o comando abaixo (de mapping e settings) em um index existente?

{
  "mappings": {
    "conhecimento": {
      "_all": {
        "type": "string",
        "index": "analyzed",
        "analyzer": "portuguese"
      },
      "properties": {
        "CORPO_HTML": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "CORPO_PERGUNTA": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "CORPO_RESPOSTA": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "ID": {
          "type": "long"
        },
        "TAGS": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        },
        "TITULO_PERGUNTA": {
          "type": "string",
          "index": "analyzed",
          "analyzer": "portuguese"
        }
      }
    }
  },
  "settings": {
    "index": {
      "number_of_shards": "3",
      "number_of_replicas": "0"
    }
  }
}

Garanta sua matrícula hoje e ganhe + 2 meses grátis

Continue sua jornada tech com ainda mais tempo para aprender e evoluir

Quero aproveitar agora
1 resposta
solução!

Olá Nuan, tudo bem?

Você não conseguira inserir estas informações em um index já existente, pois não pode alterar o mapeamento ou o tipo de um campo que já existe, pois pode invalidar dados que já foram inseridos. Então para inserir estas informações no Elasticsearch, você precisa criar um novo index.

Espero ter ajudado!