Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Can anyone help me to implement highlighter in lucene 2.3.2

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


dhivyakrishnan87 at yahoo

Oct 30, 2009, 3:02 AM

Post #1 of 2 (390 views)
Permalink
Can anyone help me to implement highlighter in lucene 2.3.2

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,
M.Dhivya


--- On Fri, 30/10/09, Anshum <anshumg [at] gmail> wrote:


From: Anshum <anshumg [at] gmail>
Subject: Re: soln found for index overwritting problem
To: java-user [at] lucene
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"));*
*writer.addDocument(d);*
This should help.
--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

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 <dhivyakrishnan87 [at] yahoo>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.
> http://in.overview.mail.yahoo.com/connectmore



From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew


hossman_lucene at fucit

Oct 31, 2009, 3:54 PM

Post #2 of 2 (356 views)
Permalink
Re: Can anyone help me to implement highlighter in lucene 2.3.2 [In reply to]

: Subject: Can anyone help me to implement highlighter in lucene 2.3.2
: In-Reply-To: <867513fe0910300021k5f9766e1nf97f7e2bae5e1489 [at] mail>

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to
an existing message, instead start a fresh email. Even if you change the
subject line of your email, other mail headers still track which thread
you replied to and your question is "hidden" in that thread and gets less
attention. It makes following discussions in the mailing list archives
particularly difficult.
See Also: http://en.wikipedia.org/wiki/Thread_hijacking





-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.