I store data in the elastic search like this:
{
"_index": "my_index",
"_type": "doc",
"_id": "6lDquGEBFRQVe0x93eHk",
"_version": 1,
"_score": 1,
"_source": {
"ID_Number": "6947503728601",
"Userrname":"Jack.m07",
"name": "Jack",
"photos": ["img/one.png"]
}
}
I want find user by ID_Number and push new value to Photos
e.g)"photos": ["img/one.png","img/two.png"]
How can I implement this?what is the query?
dadoonet
(David Pilato)
March 10, 2018, 7:23am
2
What would be better is to use your id number as the _id field as well.
In which case it will be super straight forward to send a new version of the document.
Otherwise you need to call the update by query API. But it's slower.
1 Like
Thanks Dear @dadoonet it's very helpfull
can you help me in an other problem?
I store data in the Elasticsearch like this:
{
"_index": "my_index",
"_type": "doc",
"_id": "6lDquGEBFRQVe0x93eHk",
"_version": 1,
"_score": 1,
"_source": {
"Barcode": "6947503728601",
"category":"pen",
"name": "panter",
"price":"4$",
"created_at": "1519225855"
}
}
Each data set has a barcode. For example, all panter pen have "6947503728601" as a barcode but they have different created_at values.
I want to search for partial barcode numbe…
system
(system)
Closed
April 8, 2018, 5:39am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.