i am searching for strings indexed in lucene as documents. now i give it a long string to match.
example:
"iamrohitbanga is a stackoverflow user" search string
documents:
document 1: field value: rohit
document 2: field value: banga
now i use fuzzy matching to find the search strings in the documents.
开发者_如何学编程the 2 documents match. i want to retrieve the position at which the string rohit occurs in the search string. how to do it using lucene java api. also note that the fuzzy matching would lead to inexact matches also. but i am interested in the position word in the searched string.
the answer to Finding the position of search hits from Lucene
refers to a website which requires us to download some files from http://www.iq-computing.de and this page does not load.
so could you provide a solution?
Probably this should help: http://lucene.apache.org/java/2_9_1/api/contrib-highlighter/index.html
精彩评论