How to change the field content of an index


(Chrigui Mohamed) #1

I have an index contains only one document with a field that contains an integer ("lns": 3) and I want to change it to ("lns": 5) ... I did :
PUT logstash-2018.01.09/_type/0
{
"lns":3
}
when I go to discover of kibana I found that this field has not been changed !!

How can I do to change the content of this field and see it in the discover of kibana ?


(Fram Souza) #2

Hi @chrigui94

What's a ID of document with field "ins: 3" ?
You can see executing: GET logstash-2018.01.09/_search?pretty

You can execute this for change a content of field

PUT logstash-2018.01.09/(typeofindex)/(idofdocument)
{
"ins": 3
}

Imagine it's not working because the ID in your query is wrong.

Remember! When you use PUT in same doc ID, a doc will be override.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.