Currently I\'m working with the Lucene.net 2.9.2 framework. As a result of my search I would like to achieve result page (asp.net) with highlighted text fragment. I would like t
You want to create a new Fragmenter (Similar to SimpleFragmenter). The function you need to adjust is:
public virtual bool IsNewFragment(Token token)
{
bool isNewFrag = token.EndOffset() >= (fragmentSize * currentNumFrags);
if (isNewFrag)
{
currentNumFrags++;
}
return isNewFrag;
}
This will likely need some adjustment until you get the correct logic, but that should give you a pretty good head start