Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 22156 invoked from network); 29 Jun 2010 16:00:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 16:00:00 -0000 Received: (qmail 79692 invoked by uid 500); 29 Jun 2010 15:59:58 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 79551 invoked by uid 500); 29 Jun 2010 15:59:57 -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 79543 invoked by uid 99); 29 Jun 2010 15:59:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 15:59:57 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,HTML_OBFUSCATE_10_20,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pablomendes@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 15:59:49 +0000 Received: by iwn38 with SMTP id 38so8169628iwn.35 for ; Tue, 29 Jun 2010 08:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=kVQNZU33SO388gY2B3x96zJzJeKI2qJkrAMbXUZMcvo=; b=WLFSSv/VdggqJ4osPf7fm86ivP0LjmyHOeypHBHTSW00LKH+7dVXUGaOiLmKJ3a2Jy LpY5SC5CkuMie8/V1yQ22tLhYouLCG4LNzXf+FEYn7Niusl2qfzTCMiK5Ly6PgM7cFw/ 8n1lrA8puFz4dMTLJxyAmAHxkXafe4P3nvsxI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=uzOTrIo9idToZVK1jem974yo2nk8H9vL2ZagB5CkVWIw2LqNDOpfysvRSUbC9tf8R7 dviX+QfKuNMq5BhHdMGVpfpEXVRXIPEQSxnnQ7I3sXdtUwtq5iGQdCYi3WbrscgLM23E 5krnnXZObIraSsygM9Sd7Z6dKdjLF9cRgrF20= MIME-Version: 1.0 Received: by 10.231.150.18 with SMTP id w18mr7287026ibv.43.1277827108701; Tue, 29 Jun 2010 08:58:28 -0700 (PDT) Received: by 10.231.34.6 with HTTP; Tue, 29 Jun 2010 08:58:28 -0700 (PDT) Date: Tue, 29 Jun 2010 17:58:28 +0200 Message-ID: Subject: IndexWriter.mergeDocument(Term term, Document doc) From: Pablo Mendes To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e68dd264e60766048a2d4edf X-Virus-Checked: Checked by ClamAV on apache.org --0016e68dd264e60766048a2d4edf Content-Type: text/plain; charset=ISO-8859-1 Hi all, I'm looking for a functionality similar to IndexWriter.updateDocument() *IndexWriter.**updateDocument *(Term term, Document doc) Updates a document by first deleting the document(s) containing term and then adding the new document. *IndexWriter.**updateDocument *(Term term, Document doc, Analyzer analyzer) Updates a document by first deleting the document(s) containing term and then adding the new document. But instead of deleting the document containing term and then adding the new document, I'd like to merge the information from the new document with the document containing the term . *IndexWriter.merge**Document*(Term term, Document doc) Updates a document by merging the information in the document containing term and the new document. *IndexWriter.merge**Document*(Term term, Document doc, Analyzer analyzer) Updates a document by merging the information in the document containing term and the new document. I couldn't find anything like that in 3.0.2 [1], so I assume I'll have to implement it myself. Is the implementation of IndexWriter.updateDocument itself a good starting point? Does anybody have suggestions on how to go about it? Or is it there in some other shape or form? Or is it absolutely discouraged? Thanks, Pablo [1] http://lucene.apache.org/java/3_0_2/api/core/org/apache/lucene/document/class-use/Document.html --0016e68dd264e60766048a2d4edf--