Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 8643 invoked from network); 30 Oct 2009 10:52:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Oct 2009 10:52:19 -0000 Received: (qmail 73675 invoked by uid 500); 30 Oct 2009 10:52:17 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 73595 invoked by uid 500); 30 Oct 2009 10:52:17 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 73585 invoked by uid 99); 30 Oct 2009 10:52:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 10:52:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [203.104.17.175] (HELO web94811.mail.in2.yahoo.com) (203.104.17.175) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Oct 2009 10:52:07 +0000 Received: (qmail 93852 invoked by uid 60001); 30 Oct 2009 10:02:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1256896937; bh=6B7kPA4CeV9YfXbk43LPCiRRWephCmTcKys9LIIEmrI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=CnIFZoTW+ANh7euEhFBAjaLn4pMCqKTQwXBj+1J3RjHhTPR1uHclAXK93rCToVK54uxozfaijOtw7qkzVi6YXl8M/0TtH36vthfvWoUTqdYiYQ0MTdSspGzpmz+ADCGlCc11FoCzI1j1IQBN7vY6L54On8hIUirFRo0MGRGnY8k= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=tLF9tjfB7euIivVN7vFfQx9UPjQkUtrGSyEbcfBeGOhDeGt8GqksVjWAZT+REeW4umEHXoD5o3l71MWmtuURnhhVeBMVEhDTHgLSvcONpRqu26h2MReyRifqyGSnYjvV3M1R26yIK5ON1Y5qzHXzuUe3B85BvhXMCH04ak1l8u4=; Message-ID: <449382.93445.qm@web94811.mail.in2.yahoo.com> X-YMail-OSG: Snib114VM1kxVR8mmQdirCY78AmUvz6dsXV6oaoe4yExl8v3bz_tkloGQaV7Od8O4f1hA.y817i21p2NjxRR04gbGjEFlW1Bmo9C9TasVHJg_2Wi26aJYUriuSOlOj.0pJfN7QURJ6_dtEsLMHlCnUKpGD7t.Vhhr6VxOzJlFYJbegKOEZ8JMZv13GFlmAAFY9eaDHfIl3vtFBWNqMnG7USgFHgkmGsmH5Gw9gOk9tDCFlbwBQ-- Received: from [59.90.244.83] by web94811.mail.in2.yahoo.com via HTTP; Fri, 30 Oct 2009 15:32:17 IST X-Mailer: YahooMailClassic/8.1.6 YahooMailWebService/0.7.361.4 Date: Fri, 30 Oct 2009 15:32:17 +0530 (IST) From: DHIVYA M Subject: Can anyone help me to implement highlighter in lucene 2.3.2 To: java-user@lucene.apache.org In-Reply-To: <867513fe0910300021k5f9766e1nf97f7e2bae5e1489@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-354934340-1256896937=:93445" X-Virus-Checked: Checked by ClamAV on apache.org --0-354934340-1256896937=:93445 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi all, =A0 Am using lucene 2.3.2 I would like to have the search result similar to that of the google respon= se. 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. =A0 But am blind about using it to get the desired response as that of google. =A0 Kindly help me in this regard =A0 Thanks in advance, M.Dhivya --- On Fri, 30/10/09, Anshum wrote: From: Anshum Subject: Re: soln found for index overwritting problem To: java-user@lucene.apache.org Date: Friday, 30 October, 2009, 7:21 AM The only way to do it is to index a field (self maintained primary key) wit= h 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 wrot= e: > 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 f= or > 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 > > >=A0 =A0 =A0 Keep up with people you care about with Yahoo! India Mail. Lea= rn how. > http://in.overview.mail.yahoo.com/connectmore =0A=0A=0A From cricket scores to your friends. Try the Yahoo! India Ho= mepage! http://in.yahoo.com/trynew --0-354934340-1256896937=:93445--