Add highlight support for ListArticles and ListReplies
Fix ListReplies reference search(more_like_this)
Although the document says we can directly use "fields" : ["title", "description"] to match multiple field, the results aren't correct.
Fixes #51
Problem (solved by version 2)
Version 1: Get hyperlinks highlight in edges.node.
hyperlinks breaks into (highlight.)hyperlinks.title array, (highlight.)hyperlinks.summary array, etc.
It's difficult to know which hyperlink group the highlight belongs to.
Sample: Search a article that contains seven hyperlinks and two of them are invalid(can't fetch).
Elasticsearch Response: (I didn't highlight summary in this query)
Version 2: Get hyperlinks highlight through inner_hit (in nested query of hyperlinks).
This can get groups of hyperlink highlight when the more_like_thishyperlinks query matched.
But the problem is we can't highlight hyperlinks if the query only matches the text field.
Finally we choose version 2, because we want to show the hyperlinks matched only.
Sample: Search a article that contains seven hyperlinks and two of them are invalid(can't fetch).
Elasticsearch Response:
Coverage increased (+0.08%) to 88.666% when pulling ba79882b6bbee4bd524577f332515fc60d0a9681 on features/51-highlight into a9a68b9d1d5a3b75a32b021c8b799dd58c1fb01c on master.
Figma
"fields" : ["title", "description"]
to match multiple field, the results aren't correct.Fixes #51
Problem (solved by version 2)
Version 1: Get hyperlinks highlight in
edges.node
.hyperlinks
breaks into(highlight.)hyperlinks.title
array,(highlight.)hyperlinks.summary
array, etc. It's difficult to know which hyperlink group the highlight belongs to.There's an issue discussion about highlight array field.
Sample: Search a article that contains seven hyperlinks and two of them are invalid(can't fetch). Elasticsearch Response: (I didn't highlight summary in this query)
Version 2: Get hyperlinks highlight through
inner_hit
(in nested query of hyperlinks).This can get groups of hyperlink highlight when the
more_like_this
hyperlinks
query matched. But the problem is we can't highlighthyperlinks
if the query only matches thetext
field.Finally we choose version 2, because we want to show the hyperlinks matched only.
Sample: Search a article that contains seven hyperlinks and two of them are invalid(can't fetch). Elasticsearch Response: