lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sprateek <>
Subject Re: search result and highlighting
Date Sat, 08 Oct 2011 18:35:34 GMT
Thanks Ted!!! :)

Sent from my BlackBerry® smartphone

-----Original Message-----
From: "Ted Dunning [via Lucene]" <>
Date: Sat, 8 Oct 2011 11:33:54 
To: sprateek<>
Subject: Re: search result and highlighting

On Sat, Oct 8, 2011 at 4:55 AM, sprateek <> wrote:

> Hello All,
> If a particular document contains N occurance of Search term then I was to
> show it as N results in Search result page.  For example if I am searching
> for word 'Hello' and my document contains this word three times then in
> search result it should be shown three times (As different results). I also
> want that in first result only furst hello should be highlighted and second
> result second hello should be highlighted and in third one third hello
> should be.
> Please let me know if its possible with Lucene or not.
Yes.  But it will require that you do a bit of coding.

You can pretty easily scan the original result list (of documents each
mentioned once) and create a new list where each match in each document is
mentioned separately.

There isn't anything that does this naturally that I have ever heard of.
 This need is really a function of the presentation layer rather than of the
search layer.

If you reply to this email, your message will be added to the discussion below:

To unsubscribe from search result and highlighting, visit

View this message in context:
Sent from the Lucene - General mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message