Cloudsearch动态字段跳过字段

时间:2016-02-05 01:54:42

标签: amazon-web-services amazon-cloudsearch

在cloudsearch(使用IMDB数据)中,我向现有索引选项添加了两个动态字段 in the indexing options

然后,我从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/MV5BMTQxNTc3NDM2MF5BMl5BanBnXkFtZTcwNzQ5NTQ3OQ@@._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 个答案:

答案 0 :(得分:1)

您需要将动态字段作为 if (ctrl.CrmConnectionMgr != null && ctrl.CrmConnectionMgr.CrmSvc != null && ctrl.CrmConnectionMgr.CrmSvc.IsReady) { CrmServiceClient svcClient = ctrl.CrmConnectionMgr.CrmSvc; if (svcClient.IsReady) { // Get data from CRM . string DisabledMailBoxUsersFetchXML = @"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='systemuser'> <attribute name='fullname' /> <attribute name='businessunitid' /> <attribute name='title' /> <attribute name='address1_telephone1' /> <attribute name='positionid' /> <attribute name='systemuserid' /> <order attribute='fullname' descending='false' /> <link-entity name='mailbox' from='mailboxid' to='defaultmailbox' alias='aa'> <filter type='and'> <condition attribute='statecode' operator='eq' value='1' /> </filter> </link-entity> </entity> </fetch>"; var DisabledMailBoxUsersResult = svcClient.GetEntityDataByFetchSearchEC(DisabledMailBoxUsersFetchXML); if (DisabledMailBoxUsersResult != null) { //perform the cast here ---> var disabledMailBoxUsersList = (from t in DisabledMailBoxUsersResult.Entities select t as CRMSDKTypeProxy.SystemUser).ToList(); disabledMailboxUserLBx.ItemsSource = disabledMailBoxUsersList; } else MessageBox.Show("All user's mailboxes are approved.."); } } 数组的一部分,请参阅下文:

fields