lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DHIVYA M <>
Subject Can anyone help me to implement highlighter in lucene 2.3.2
Date Fri, 30 Oct 2009 10:02:17 GMT
Hi all,
Am using lucene 2.3.2
I would like to have the search result similar to that of the google response.
On my study i found that highlighter could do this. I found the highlighter class available
in the contrib folder of lucene 2.3.2 .zip.
But am blind about using it to get the desired response as that of google.
Kindly help me in this regard
Thanks in advance,

--- On Fri, 30/10/09, Anshum <> wrote:

From: Anshum <>
Subject: Re: soln found for index overwritting problem
Date: Friday, 30 October, 2009, 7:21 AM

The only way to do it is to index a field (self maintained primary key) with
each document and do a deleteDocument (or updateDocument) for each document
before adding it.
Something like
*writer.deleteDocument(new Term("term-key","unique-id"));*
This should help.
Anshum Gupta
Naukri Labs!

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............

On Fri, Oct 30, 2009 at 12:20 PM, DHIVYA M <>wrote:

> Thanks a lot sir. Its working out well.
> But i have one more doubt.
> Is it possible to check whether the same documents are indexed again and
> again?
> bcos due to appending of indexes,
> when i search a query,
> the result is displayed as much number of times as the index is created for
> that document.
> how to solve this sir
> Is it possible to remove duplicates with a flag in indexwriter?
> Kindly let me know about this.
> Thanks in advance
> M.Dhivya
>      Keep up with people you care about with Yahoo! India Mail. Learn how.

      From cricket scores to your friends. Try the Yahoo! India Homepage!
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message