lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <>
Subject Re: Lucene rich-text search with returned hyperlinks
Date Mon, 11 May 2009 03:02:15 GMT
Hey there,

On Mon, May 11, 2009 at 4:43 AM, apgw <> wrote:
> I am new to Lucene. Is this the right utility to use for the following use
> case:
> 1) Find a search term - eg. 'lithium battery' in some technical rich-text
> data (can be in any european language), 4K - 64K size, and return the exact
> position in the text so that the occurrence can be turned into a hyperlink
> within the text, and the full text returned to the user with the embedded
> hyperlinks which he can select if he is interested.
> 2) Also find and hyperlink "lithium batteries", or "lithium hydride
> batteries" (with lower ranking) and so on.

You might wanna look at SpanQuery or the spans package itself.
SpanNearQuery will help you with your 2nd question.

I personally do not have a lot of experience with Highlighting or
similar things like you wanna do (hyperlinks). You may want to look at
highlighting as well.

hope it helps.

> Thanks for your help!
> --
> View this message in context:
> Sent from the Lucene - General mailing list archive at

View raw message