Is there any Lucene marker that does not require the original text, but rather can work at temporary positions, etc.

I read the new second edition of Lucene in action, and they give an example of highlighting, but, unfortunately, this requires the original text to get the position of the terms, etc. The token is official in Contrib, so its sponsorship or official token is implied.

Does anyone know of another marker that does not require source code, but works using the term "position" (sorry if I got the wrong terminology) ???

+3
source share
1 answer

FastVectorHighlighter , . (FVH , ). . 274 Lucene . :

TokenStream stream = TokenSources.getAnyTokenStream(searcher.getIndexReader(), sd.doc, "title", doc, analyzer);

.

0

Source: https://habr.com/ru/post/1766327/


All Articles