Solr highlighting : extract complete sentence
As I'm sayin开发者_运维问答g in title, i want to get a complete sentence when i search with highlighting.
Actually, i get a result which is cut in middle of a word.
For example, if I'm searching for the word "complete", I get ying in title, i want to get a complete sentence wh
but I want the complete sentence As I'm saying in title, i want to get a complete sentence when i search with highlighting
.
I've already tried to use "fragmenter" but I haven't any result.
Can anyone help me ?
Thanks and sorry for my english.
Also check if your request handler or query parameter has hl.useFastVectorHighlighter set to true. If the field that it generates summaries on are not set up with the correct term settings as mentioned in the wiki, the words could cut as you describe.
I think you find your answer here: http://wiki.apache.org/solr/HighlightingParameters
Take a look at the parameter hl.snippets and hl.fragsize, wehere you can define the length of the returned fragment - so you could set the value to the fieldsize (if the field isn't so large).
An other interesting parameter in your case is hl.fragmenter
got almost the same problem cutting words. As I just mentioned over here you could use another BoundaryScanner. This gave me perfect results.
精彩评论