Hi guys;
Ive got a masive Json with single fields and list, when I try to update a
single field it works fine, but when I try to update a list, is delete not
only the whole list I want (Which I have read it is it behaviour, It also
delete the other list.
Let see a litte example:
This is the document i have stored in Solr:
"id": 2313053,
"language": "es_ES",
"type": "TEST23T",
"catalogues_categories_id": [
"466007",
],
"catalogues_categories_keyword": [
"ni%C3%B1os/ni%C3%B1a-%283-14-a%C3%B1os%29/shop-by-look/",
],
"catalogues_categories_stores": [
"[11727, 11727]"
],
"catalogues_categories_path_sequence": [
6,
],
"catalogues_categories_path_category": [
"NIÑOS",
],
"_version_": 1487035676940566500,
"image": {
"name": "0283702802_1_1",
"timestamp": "1410512147745C"
},
* "stores": [.
{
"comparePrice": 0,
"price": 0,
"storeId": 10701,
"sales": 0
}*
And Im trying to update the store list with this json:
{
"products":[ {
"id":2313053,
"language":"es_ES",
"type": "Name:",
*"stores":{"set":[
{"storeId":10701,"price":101,"comparePrice":170,"sales":9432}
]
}*}
]
}
And it does nothing :-(
The idea is, to have a clear idea of how to update the list of elements
using the SET modifier or something like that, It works fine for a single
element, but I cannot get it work with a list
I saw on the internet:
[.
{"id" : "book1",
"author" : {"set":"Neal Stephenson"},
"cat" : {"add":"Cyberpunk"}
}
]'
It would be nice to know how to update the field price inside stores:
"stores": [
{
"comparePrice": 0,
"price": 0,
"storeId": 10701,
"sales": 0
},
{
"comparePrice": 0,
"price": 0,
"storeId": 10702,
"sales": 0
},
Thank you very much guys!! :-)
--
View this message in context: http://lucene.472066.n3.nabble.com/Update-a-list-Json-in-Solr-tp4173389.html
Sent from the Lucene - General mailing list archive at Nabble.com.
Ive got a masive Json with single fields and list, when I try to update a
single field it works fine, but when I try to update a list, is delete not
only the whole list I want (Which I have read it is it behaviour, It also
delete the other list.
Let see a litte example:
This is the document i have stored in Solr:
"id": 2313053,
"language": "es_ES",
"type": "TEST23T",
"catalogues_categories_id": [
"466007",
],
"catalogues_categories_keyword": [
"ni%C3%B1os/ni%C3%B1a-%283-14-a%C3%B1os%29/shop-by-look/",
],
"catalogues_categories_stores": [
"[11727, 11727]"
],
"catalogues_categories_path_sequence": [
6,
],
"catalogues_categories_path_category": [
"NIÑOS",
],
"_version_": 1487035676940566500,
"image": {
"name": "0283702802_1_1",
"timestamp": "1410512147745C"
},
* "stores": [.
{
"comparePrice": 0,
"price": 0,
"storeId": 10701,
"sales": 0
}*
And Im trying to update the store list with this json:
{
"products":[ {
"id":2313053,
"language":"es_ES",
"type": "Name:",
*"stores":{"set":[
{"storeId":10701,"price":101,"comparePrice":170,"sales":9432}
]
}*}
]
}
And it does nothing :-(
The idea is, to have a clear idea of how to update the list of elements
using the SET modifier or something like that, It works fine for a single
element, but I cannot get it work with a list
I saw on the internet:
[.
{"id" : "book1",
"author" : {"set":"Neal Stephenson"},
"cat" : {"add":"Cyberpunk"}
}
]'
It would be nice to know how to update the field price inside stores:
"stores": [
{
"comparePrice": 0,
"price": 0,
"storeId": 10701,
"sales": 0
},
{
"comparePrice": 0,
"price": 0,
"storeId": 10702,
"sales": 0
},
Thank you very much guys!! :-)
--
View this message in context: http://lucene.472066.n3.nabble.com/Update-a-list-Json-in-Solr-tp4173389.html
Sent from the Lucene - General mailing list archive at Nabble.com.