lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: Matching Search Terms?
Date Tue, 22 Jul 2008 15:07:13 GMT
Erik,

Thanks!  Glad to see you on this project (we miss you on HiveMind)!
I'll try the Highlighter approach and see if that works.  Are there
any examples out there?

James

On Tue, Jul 22, 2008 at 10:59 AM, Erik Hatcher
<erik@ehatchersolutions.com> wrote:
>
> On Jul 22, 2008, at 10:53 AM, James Carman wrote:
>>
>> We have a requirement for our project where the user would like to be
>> able to paste a bunch of terms into a search box.  They want to
>> basically "or" together each line of the pasted text as a full-text
>> search query.  However, when the results come back, they'd like to
>> know which one of the lines matched the specific item returned.  Is
>> there an easy way to do that with Lucene?  I looked at the Hit API,
>> but nothing really jumped out at me.  I would think that's where I
>> should look.
>
> There are two options to consider... one is the Highlighter (one of Java
> Lucene's contrib modules) and the other is converting the query to a
> SpanQuery and walking the Spans from that API.   The Highlighter is the
> simplest approach to see if it suffices.
>
>        Erik
>
>

Mime
View raw message