Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 31838 invoked from network); 8 Feb 2006 12:50:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Feb 2006 12:50:11 -0000 Received: (qmail 42104 invoked by uid 500); 8 Feb 2006 12:50:00 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 42082 invoked by uid 500); 8 Feb 2006 12:49:59 -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 42071 invoked by uid 99); 8 Feb 2006 12:49:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2006 04:49:59 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.93.125.162] (HELO cpanel37.gzo.com) (69.93.125.162) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2006 04:49:58 -0800 Received: from home-pool7-2.com2com.ru ([195.98.167.2] helo=pb) by cpanel37.gzo.com with esmtpa (Exim 4.52) id 1F6olL-0003g1-A2 for java-user@lucene.apache.org; Wed, 08 Feb 2006 06:49:36 -0600 From: "Pasha Bizhan" To: Subject: RE: Duplicates recods in index Date: Wed, 8 Feb 2006 15:56:41 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 In-Reply-To: <41D8E340E5045F4ABA553E4524E3D379294116@orbitsoft.orbitscripts> Thread-Index: AcYsln6eSVC7JxUBR9+yzswmA5TlDQAGEZwA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel37.gzo.com X-AntiAbuse: Original Domain - lucene.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - lucenedotnet.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20060208124959.29EE910FB008@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, > From: Anton Potehin [mailto:anton@orbita1.ru] > 1) create Document object > > 2) add 5 fields into Document (id, name, field1, field2, > field3). All fields are stored, indexed and tokenized > > 3) check if the document with current id and name was added before Just perform the search with given id and name values. String query = "+id:(" + doc.get("id") + ") +name:(" + doc.get("name") + ")"; Pasha Bizhan --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org