Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C449A200B32 for ; Thu, 23 Jun 2016 14:16:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C2AC7160A59; Thu, 23 Jun 2016 12:16:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1693F160A58 for ; Thu, 23 Jun 2016 14:16:54 +0200 (CEST) Received: (qmail 90167 invoked by uid 500); 23 Jun 2016 12:16:53 -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 Delivered-To: moderator for java-user@lucene.apache.org Received: (qmail 33583 invoked by uid 99); 23 Jun 2016 11:47:44 -0000 X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=rEn4t3S8gGJ2l9Ju9XrTq/LLR2R4k0rFEZwKbDyATSw=; b=xIkQ60fGs+IOXOb5Eh4WRW1GNepqdcUBG/+CmjjqwqKB6wnk25UxhM2gyF1plqBijL vapMP8p7NpfFHtSfalCpeyo2TJcGA4CIu3sKHn5+dnLt+vfJD8ouA3njwpYS5ps1hbI6 wmOyl7jpC42oLKeSmOLPETni7EfP5OxKTLPfxZawgLIOwUbBFXBISXX52y1Q9OE4sODb NjjV34COUp/Uxegu9RaiwDkgbl9KyYnDyImtk1ZrOaGYifdJ2hihH3gNGrikResF9R64 R9zyVOtAfqT3li4JPpXliTbSDgK2kEK40o7iejJGxy2graXP46Rq3O24rqeq/ebpWJq4 g3wg== 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; bh=rEn4t3S8gGJ2l9Ju9XrTq/LLR2R4k0rFEZwKbDyATSw=; b=jsygxDl2cPzDvE68seEfWPOPSIHZFFlZnSPqA+96J4CyFmplrg3O4RkFz5io0eOGmL iZrw3so5WhlopITBlU7KtQIpq0z0UnSjvDcriELk0UrrsZSv4vleKuLaK6BOu/Oa3W+1 E5LfzIYY/nFymOQeDTAEMjZE09ndTF86WY83lB2/TjZnFUIOOOqk9bCMQhNgMZeAGcL1 P0tFeVv0V8vIr1GQ3CrxMZASb8mb93AEeB3tueZHGc+RIAbiLho3lFxeGoHakrJbmYYG ipYPdcY9GOjx9oq3o4OBzEzAw+E0JCEIO1EmaLbwTgOTCeuEkOxJ87aTZeljAMDvt8FS KTtQ== X-Gm-Message-State: ALyK8tJ+EpdMKTBqw3J7PKskddivuidQ3ULl+D7oxkUltcTK6A+L7MoFfmMfYDzBewuEqg8ZY2+uTLD+G/ciJQ== X-Received: by 10.194.170.197 with SMTP id ao5mr27586211wjc.99.1466682461158; Thu, 23 Jun 2016 04:47:41 -0700 (PDT) MIME-Version: 1.0 From: Baskakov Daniel Date: Thu, 23 Jun 2016 11:47:31 +0000 Message-ID: Subject: Synchronous Lucene index update tests occasionally fail To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=089e013c68461884860535f09f30 archived-at: Thu, 23 Jun 2016 12:16:56 -0000 --089e013c68461884860535f09f30 Content-Type: text/plain; charset=UTF-8 Originally i've posted the question at stackoverflow.com but without any reply. So I hope someone can help me in the official list. I'm testing that dynamic changes of the domain model reflects at the Lucene index. Special event listeners (synchronous, no multithreading here) are executed when the domain model components change. Listeners update the Lucene index: Document doc = createDocumentForComponent(domainModelComponent); indexWriter.updateDocument(docTerm, doc); indexWriter.commit(); Then I perform searching by a query that contains recently added changes. Most of the time tests work perfect, but sometimes they fail (especially in automated builds). I've tried to acquire an IndexSearcher by different ways: create a new searcher on the same Directory or obtain it via SearcherManager. Is there a way to made recent index changes available to index searcher with 100% confidence? --089e013c68461884860535f09f30--