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 0E427200B48 for ; Mon, 18 Jul 2016 17:08:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0CDEF160A65; Mon, 18 Jul 2016 15:08:51 +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 57015160A5D for ; Mon, 18 Jul 2016 17:08:50 +0200 (CEST) Received: (qmail 61143 invoked by uid 500); 18 Jul 2016 15:02:09 -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 61128 invoked by uid 99); 18 Jul 2016 15:02:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Jul 2016 15:02:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8BF28C040A for ; Mon, 18 Jul 2016 15:02:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.747 X-Spam-Level: X-Spam-Status: No, score=-3.747 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 67NpcJuCphbU for ; Mon, 18 Jul 2016 15:02:07 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 56BB85F2C2 for ; Mon, 18 Jul 2016 15:02:07 +0000 (UTC) Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6IF25xP014934 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Jul 2016 15:02:06 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u6IF252l010014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Jul 2016 15:02:05 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u6IF25TD000730 for ; Mon, 18 Jul 2016 15:02:05 GMT Received: from [10.175.176.24] (/10.175.176.24) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Jul 2016 08:02:04 -0700 Message-ID: <578CEF09.3070402@oracle.com> Date: Mon, 18 Jul 2016 17:00:25 +0200 From: Vladimir Kotal User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: MmapDirectory and IndexReader reuse References: <5788B196.4050302@oracle.com> <02f501d1de7f$c65e0b80$531a2280$@thetaphi.de> In-Reply-To: <02f501d1de7f$c65e0b80$531a2280$@thetaphi.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] archived-at: Mon, 18 Jul 2016 15:08:51 -0000 On 07/15/16 12:00 PM, Uwe Schindler wrote: > Hi, > > You should keep the IndexReader open for the whole time! Otherwise there are more bottlenecks and slowdowns. > > If you are updating the Index, you should use SearcherManager that reopens the index reader accordingly. After updating the index you should also not completely close and reopen the index. SearcherManager uses the DirectoryReader.reopen() method, which just updates the "view" currently seen and involves minimal syscalls (none at all if nothing changes). Is it somehow possible to use SearcherManager with MultiReader to search multiple indexes ? We need to have the IndexSearcher to be constructed from multiple IndexReaders and the executor with distinct thread pool. Looking at the documentation there does not seem to be a way to do that as the SearcherManager constructor works only on single directory. v. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org