lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
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 <anthony@databaserepublic.com> 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.
org.apache.lucene.search.spans
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.

simon
>
> Thanks for your help!
> --
> View this message in context: http://www.nabble.com/Lucene-rich-text-search-with-returned-hyperlinks-tp23476377p23476377.html
> Sent from the Lucene - General mailing list archive at Nabble.com.
>
>

Mime
View raw message