Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6AC0018459 for ; Mon, 25 Jan 2016 19:19:56 +0000 (UTC) Received: (qmail 29579 invoked by uid 500); 25 Jan 2016 19:19:54 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 29521 invoked by uid 500); 25 Jan 2016 19:19:54 -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 29508 invoked by uid 99); 25 Jan 2016 19:19:54 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jan 2016 19:19:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2C3BC1A03A1 for ; Mon, 25 Jan 2016 19:19:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4RR_CDaz7lJA for ; Mon, 25 Jan 2016 19:19:52 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 6DC8F25E2F for ; Mon, 25 Jan 2016 19:19:52 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id l65so77166574wmf.1 for ; Mon, 25 Jan 2016 11:19:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=QcbG6QxVHiQg3T7VZh6RpOwz51L8wTqfKGnkz2rGhcs=; b=RvK6DPIR6/sQ++HeJSZKb93mZkIO5ydpXV5BSE5YJNIn6/IuIleYmpdypQb6Cdk5R2 uapdGMmOmHzaoTS76NBtAdGH/kgcbvkcxPhDa+RF+0+6pcS3lcd2DAuZwnS7idBIyT3R 8UlgGvILmihym9YGihXeGUvIrE3GRl1Bivvbmyby/YULxIas1Dka+PECCL7I2Zaduc7r 9cmO5kxdUYQCMsbTUDcCX9jyvFG46ylc7gymVcZqnRteiXoSxi8X8A2LZAXHaK7rlliA fWc0me0VD9FmBsqMqdmjgqj+2FzqCU54/chS/krLtFqEJHBAGyyjP7N+GKOpTFB/qiNP QRqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=QcbG6QxVHiQg3T7VZh6RpOwz51L8wTqfKGnkz2rGhcs=; b=ZsJ5x2bWMNdjH+7Sgprz2ZE96aUIegxkSsznm8VjzoD6Xbtg/PoCemN32hUz2FE2hf Yh7DeLmcFUq4K7WuJ0u4qWYPJ8Eplz/LJ05DbWNYy36Bzn7uecmZqifIA+L4utoWTF/k sLodf12MLdQ4EUxLwdhPdgo9ji4uEQGCT9nspSzWSONFD2z+l3hn8HKC042LlBZqUeyX fwlJGoAKhlIXfIICVA1c6793SMkrxSfTmO9apOqPJxdW/k5QVMyut3OHUWZj27Vlji2m /6Lg1fUP4mUHXGjLNvZij+2Q2Vkcn5O3j17jL4+tKn4Jz1QWtcjwr7jayLKi0/87ErTm j/gA== X-Gm-Message-State: AG10YOTuaxAkxrjN82ejOnGzpAiMSocbyighjjiJvpc9EQ8SUFklopZzOG76OsXsVuASvZ3QxDgX6LOohnmkIQ== X-Received: by 10.194.94.138 with SMTP id dc10mr22489692wjb.37.1453749592170; Mon, 25 Jan 2016 11:19:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.128.206 with HTTP; Mon, 25 Jan 2016 11:19:32 -0800 (PST) From: marco turchi Date: Mon, 25 Jan 2016 20:19:32 +0100 Message-ID: Subject: Searching in an updated index To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7bb03d4e08a88f052a2d7442 --047d7bb03d4e08a88f052a2d7442 Content-Type: text/plain; charset=UTF-8 Dear All, I'm not an expert in Lucene, and I need to add to the index a sequence of documents. For each document, I need to check if it is already present in the index. If the answer is yes, then I need to update some information in the doc in the index, if not I need to add it. This process is iterated over all the documents, so this means that I need to query the index after I have modified it. I have read the FaQ "Does Lucene allow searching and indexing simultaneously?" but it points me to the use of the IndexReader.isCurrent() which is not available in Lucene 5.4.1 (if I'm not wrong) Then I have had a look at the Lucene's near-real-time search, an old post by Michael McCandless, but some of the commands (e.g. IndexWriter.reopen()) mentioned in the post are not available in Lucene 5.4.1. So, do you have any advice on how I can implement an efficient method that allow me to update the index and search in the last updated version? Working on a stream of document, efficiency is important. Thanks a lot in advance for your help! Marco --047d7bb03d4e08a88f052a2d7442--