In Highlighter.Net, we can use NullFragmenter to return the entire field content. Is there any way we can do this in FastVectorHighlighter.Net?
Return Entire field from GetBestFragment in FastVectorHighlighter
720 Views Asked by Midhat At
3
There are 3 best solutions below
2

Isn't it an option to just use document.Get("field_name")
and return the entire field content in such a way? You probably have you document somewhere in the context anyway (as you need doc id to GetBestFragment()
), so why not just use it?
If you use SimpleFragListBuilder-fragmenter for FastVectorHighlighter then need to modify a public static properties of fragmenter to manage fragment size:
(see source for details - 'Lucene.Net 3.0.3 SimpleFragListBuilder.cs' [http://lucenenet.apache.org/docs/3.0.3/dd/d38/_simple_frag_list_builder_8cs_source.html])