Im new to Lucene. Is there a way to get the Lucene FVH to return fragments/snippets centered around the search query instead of approximately starting with the search query? Also, Is there a way to tell the FVH fragmenter to fragment only at the newline char? Thanks!
Asked
Active
Viewed 1,211 times
2 Answers
2
Sujit Pal has a description of how to create your own fragments builder on his Salmon Run blog: http://sujitpal.blogspot.com/2011/05/customizing-lucenes-fast-vector.html
Also, Grant Ingersoll has a post at the Lucid blog about using a TermVectorMapper to construct a window around the terms so that you can pull N preceding and subsequent terms: http://www.lucidimagination.com/blog/2009/05/26/accessing-words-around-a-positional-match-in-lucene/

Scott Stults
- 71
- 4