Note that Title
in the result ends with a )
, but in the highlight result it is missing. What going on?
{
"content-search-sites-20-01-2017-16-12-22": {
"mappings": {
"searchindexdocument": {
"properties": {
"Authors": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Categories": {
"type": "keyword"
},
"Content": {
"type": "text"
},
"Excerpt": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Private": {
"type": "boolean"
},
"PublishedDate": {
"type": "date"
},
"Site": {
"type": "keyword"
},
"Tags": {
"type": "keyword"
},
"Title": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"Url": {
"type": "keyword"
}
}
}
}
}
}
GET content-search-sites/_search
{
"size": 1,
"_source": "Title",
"query" : {
"multi_match": {
"query": "Test",
"fields": [ "Title^4", "Tags^2", "Content", "Authors"]
}
},
"highlight" : {
"pre_tags": ["<mark>"],
"post_tags": ["</mark>"],
"fields" : {
"Content" : {
"fragment_size" : 150,
"number_of_fragments" : 3,
"no_match_size": 150
},
"Title": {
"fragment_size" : 150,
"number_of_fragments" : 3,
"no_match_size": 150
}
}
}
}
{
"took": 15,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 8,
"max_score": 3.0916476,
"hits": [
{
"_index": "content-search-sites-20-01-2017-16-12-22",
"_type": "searchindexdocument",
"_id": "https-rimdev-io-under-the-decision-tree-12-1482476400",
"_score": 3.0916476,
"_source": {
"Title": "Under the Decision Tree (#12)"
},
"highlight": {
"Content": [
" will help businesses fight hacker fraternisation, predict insider threats Google researchers develop a <mark>test</mark> for machine learning bias Microsoft Launches",
" 3Pillar Global bets big on machine learning Discrimination by algorithm: scientists devise <mark>test</mark> to detect AI bias The Conundrum of Machine Learning and"
],
"Title": [
"Under the Decision Tree (#12"
]
}
}
]
}
}
This was all done via Kibana, so NEST was not in the middle.