2016-02-05 67 views
0

在cloudsearch(使用IMDB數據)我添加了兩個動態字段到現有的索引選項 in the indexing optionsCloudsearch動態字段跳過字段

然後我從AWS整個JSON IMDB數據和添加的字段location_tmonth_i

[{ 
"fields": { 
    "rating": 7.4, 
    "genres": ["Comedy", "Drama"], 
    "plot": "A New Jersey guy dedicated to his family, friends, and church, develops unrealistic expectations from watching porn and works to find happiness and intimacy with his potential true love.", 
    "release_date": "2013-01-18T00:00:00Z", 
    "title": "Don Jon", 
    "rank": 1, 
    "running_time_secs": 5400, 
    "directors": ["Joseph Gordon-Levitt"], 
    "image_url": "http://ia.media-imdb.com/images/M/[email protected]@._V1_SX400_.jpg", 
    "year": 2013, 
    "actors": ["Joseph Gordon-Levitt", "Scarlett Johansson", "Julianne Moore"] 
}, 
"type": "add", 
"id": "tt2229499", 
"location_t": "Berlin", 
"month_i": 8},... 

當我上傳JSON時,它忽略了動態字段? enter image description here

無論如何我做到了,我嘗試搜索,但無濟於事。任何人都沒有我做錯了什麼。我跟着instructions書動態領域

回答

1

您需要將您的動態字段作爲fields陣列的一部分,見下圖:

[{ 
"fields": { 
    "rating": 7.4, 
    "genres": ["Comedy", "Drama"], 
    "plot": "A New Jersey guy dedicated to his family, friends, and church, develops unrealistic expectations from watching porn and works to find happiness and intimacy with his potential true love.", 
    "release_date": "2013-01-18T00:00:00Z", 
    "title": "Don Jon", 
    "rank": 1, 
    "running_time_secs": 5400, 
    "directors": ["Joseph Gordon-Levitt"], 
    "image_url": "http://ia.media-imdb.com/images/M/[email protected]@._V1_SX400_.jpg", 
    "year": 2013, 
    "actors": ["Joseph Gordon-Levitt", "Scarlett Johansson", "Julianne Moore"], 
    "location_t": "Berlin", 
    "month_i": 8 
}, 
"type": "add", 
"id": "tt2229499",},...