This commit is contained in:
Markus Cozowicz 2017-09-14 07:29:53 -04:00
Родитель ccc82d72de
Коммит dbb9b809a9
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -187,7 +187,7 @@ namespace Microsoft.DecisionService.Crawl
if (!string.IsNullOrEmpty(keywords)) if (!string.IsNullOrEmpty(keywords))
{ {
response.Keywords = keywords.Split(',').Select(k => WebUtility.HtmlDecode(k.Trim())).ToList(); response.Keywords = keywords.Split(',').Select(k => WebUtility.HtmlDecode(k.Trim())).ToList();
response.Features = JsonConvert.SerializeObject( response.Features =
new HtmlFeatures new HtmlFeatures
{ {
Keywords = new HtmlKeywordFeatures Keywords = new HtmlKeywordFeatures
@ -195,7 +195,7 @@ namespace Microsoft.DecisionService.Crawl
// make sure individual keywords are represented as individual VW features // make sure individual keywords are represented as individual VW features
Keywords = string.Join(" ", response.Keywords.Select(k => k.Replace(' ', '_'))) Keywords = string.Join(" ", response.Keywords.Select(k => k.Replace(' ', '_')))
} }
}); };
} }
// build article // build article

Просмотреть файл

@ -54,6 +54,6 @@ namespace Microsoft.DecisionService.Crawl.Data
public string Video { get; set; } public string Video { get; set; }
[JsonProperty("features", NullValueHandling = NullValueHandling.Ignore)] [JsonProperty("features", NullValueHandling = NullValueHandling.Ignore)]
public string Features { get; set; } public object Features { get; set; }
} }
} }