Hi @nikhilaravi,
When I update a record in cloudsearch using this lambda, the tags array is bing duplicated each time.
Steps to view the issue:
Open CloudSearch:
And search for hotel:NE.wvHotelPartId.197668 filtering by Search Field id
I'm *expecting the record to be:
{
"_id": "hotel:NE.wvHotelPartId.197668",
"displayName": "Hyatt Regency Boston, Boston",
"location": {
"lat": 42.35364,
"lon": -71.06074
},
"tags": [
{
"tagId": "hotel:mhid.n32totr",
"source": "master_hotel_mapping",
"inherited": false,
"active": true
},
{
"tagId": "amenity:outdoorpool",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:distancetocenter",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:bar",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:childrenpool",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:elevator",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:poolbar",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:restaurant",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:minimarket",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:cleaningdaysperweek",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:wifi",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:waterslide",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:lolloandbernie",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:isadulthotel",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "amenity:allinclusive",
"source": "ne_hotel",
"inherited": false,
"active": true
},
{
"tagId": "geo:geonames.6255149",
"displayName": "North America",
"source": "geonames",
"inherited": false,
"active": true
},
{
"tagId": "geo:geonames.6252001",
"displayName": "United States",
"source": "geonames",
"inherited": false,
"active": true
},
{
"tagId": "geo:geonames.6254926",
"displayName": "Massachusetts",
"source": "geonames",
"inherited": false,
"active": true
},
{
"tagId": "geo:geonames.4952349",
"displayName": "Suffolk County",
"source": "geonames",
"inherited": false,
"active": true
},
{
"tagId": "geo:geonames.4930956",
"displayName": "Boston",
"source": "geonames",
"inherited": false,
"active": true
},
{
"tagId": "geo:geonames.4935031",
"displayName": "Downtown Boston",
"source": "geonames",
"inherited": false,
"active": true
}
],
"metadata": [
{
"key": "tripadvisor",
"values": [
"0"
]
},
{
"key": "country",
"values": [
"USA"
]
},
{
"key": "description",
"values": [
"Populært hotel i centrum af Boston, lige ved siden af flere seværdigheder såsom parken Boston Common, markedspladsen Faneuil Hall og den populære shoppinggade Newbury Street. Hotellet har bekvemmeligheder som opvarmet indendørspool, et veludstyret motionsrum samt sauna. Rejser I som familie, findes her værelser og suiter til 4 personer. I hotellets lounge kan du nyde en drink, og i restauranten serveres forskellige retter fra det new englandske køkken."
]
}
],
"updated": "2016-04-18T21:32:28.228Z"
}
I can show you the script running on my local machine if you have time.
Hi @nikhilaravi, When I update a record in cloudsearch using this lambda, the
tags
array is bing duplicated each time. Steps to view the issue: Open CloudSearch: And search forhotel:NE.wvHotelPartId.197668
filtering by Search Fieldid
I'm *expecting the record to be:
I can show you the script running on my local machine if you have time.