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 B3158200B29 for ; Thu, 30 Jun 2016 11:59:41 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B196A160A52; Thu, 30 Jun 2016 09:59:41 +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 03A2E160A51 for ; Thu, 30 Jun 2016 11:59:40 +0200 (CEST) Received: (qmail 24759 invoked by uid 500); 30 Jun 2016 09:59:39 -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 24745 invoked by uid 99); 30 Jun 2016 09:59:39 -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; Thu, 30 Jun 2016 09:59:39 +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 C580CC02E9 for ; Thu, 30 Jun 2016 09:59:38 +0000 (UTC) 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 Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id qppYfuoX9l6s for ; Thu, 30 Jun 2016 09:59:36 +0000 (UTC) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4D48B5F478 for ; Thu, 30 Jun 2016 09:59:36 +0000 (UTC) Received: by mail-wm0-f44.google.com with SMTP id f126so214522049wma.1 for ; Thu, 30 Jun 2016 02:59:36 -0700 (PDT) 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=E8hLN61xgzFINkokEz+6Bhv0xjukYdXZDu0OJX8hbjI=; b=QI5TWjQ+Klxbx52tHYLyOz8q+DjS2+BZWFAM22i33BgZr/OqvA2AsiEP79YeRRZCZL 9jwcCqNexImRFIX/oYTC3mL/89lc6J6xBI3fqLGotIozz2KQgnsf29OWRMZhSCOZIRwK ZoS51lek3pMrmeAWVjjE77Wh6uRmdSpzRU2gAUI6PeJsWDmHv45ISHmmWtJSh9ysxQyt e8PlHapXT9xMv1F8AWk8SWrHI3aatmy3CAtTPo8rse1+K9VoLBPHKkEJphqSdTeRA/AL Glmp/CppW2jPqZXWOqotHFXHlpeBbjx/MfaN6jAJFpGNhb8Obmoa72k+plIiNRvzDTBw NkmQ== 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=E8hLN61xgzFINkokEz+6Bhv0xjukYdXZDu0OJX8hbjI=; b=CrrU3YCbM52rE/juTTKlzVRfsQKfK4nezTKbhDKJ+eiVTWZRzmDK287XakfAY13iNX slo1w+MYc2coXBGXakHJ6wKURQzWWHCXTGhK0HWXQ+KifR/WwBStSeExxeujaxdQAvlM /FrPDXH51lK6I0I/61TwOAfJ1Zc8zBUfJLLttf4LrMR+12s8kwLFPpnQjITHzleDqY6v 5KI1BMmw+Iwwji6RJGaI2V/wlp6WbV8W5dxJoTUBWMG3/DUR7vurxAof0yHXnZ2m+SCF fyqgF2rglUCiTG1KNO/vJ9dIhaJep4euyY5XovfLwG+L1MM1l1ABnwxfgpJT3zCMxTud HKBA== X-Gm-Message-State: ALyK8tJ0ofPNdtRvLODDydlF98h/BNIoXoWwV1Ido1WY56W2EPvUHWaFhVaft4IwtXUhAJEbd3iER0M1GBrfLA== X-Received: by 10.28.132.15 with SMTP id g15mr14272456wmd.67.1467280775888; Thu, 30 Jun 2016 02:59:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.17.65 with HTTP; Thu, 30 Jun 2016 02:59:35 -0700 (PDT) From: Rob Audenaerde Date: Thu, 30 Jun 2016 11:59:35 +0200 Message-ID: Subject: clone RAMDirectory To: "java-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=001a11442e0a6ec6ff05367beda3 archived-at: Thu, 30 Jun 2016 09:59:41 -0000 --001a11442e0a6ec6ff05367beda3 Content-Type: text/plain; charset=UTF-8 Hi all, For increasing the speed of some of my application tests, I want to re-use/copy a pre-populated RAMDirectory over and over. I'm on Lucene 6.0.1 It seems an RAMDirectory can be a copy of a FSDirectory, but not of another RAMDirectory. Also RAMDirectory is not Clonable. What would be the 'proper' approach to re-use (fast copy) pre-populated indices over tests? I know I can create a FSDirectory and copy that, but then I also need to take into account temporary files etc. Thanks in advance, - Rob --001a11442e0a6ec6ff05367beda3--