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 6F318200D37 for ; Thu, 9 Nov 2017 23:08:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6DB2B160BEF; Thu, 9 Nov 2017 22:08:17 +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 B2D5B1609C8 for ; Thu, 9 Nov 2017 23:08:16 +0100 (CET) Received: (qmail 20278 invoked by uid 500); 9 Nov 2017 22:08:15 -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 20265 invoked by uid 99); 9 Nov 2017 22:08:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2017 22:08:15 +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 5BE4C1A406C for ; Thu, 9 Nov 2017 22:08:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.981 X-Spam-Level: * X-Spam-Status: No, score=1.981 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=mikemccandless-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0v1ZS2ZI29Il for ; Thu, 9 Nov 2017 22:08:13 +0000 (UTC) Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com [209.85.213.50]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DC01861742 for ; Thu, 9 Nov 2017 22:08:12 +0000 (UTC) Received: by mail-vk0-f50.google.com with SMTP id y196so4979597vkc.5 for ; Thu, 09 Nov 2017 14:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mikemccandless-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=uHvnKiO8snaK7XgZ58nYTEBNaL7YHBVtouxxBqKreug=; b=Tjye25hgWgGkiEp1+JK3Bxp2Z6Dac9NZgq+qiINIxQNoEOhS0geY23n/VUMSyKNhY1 uMuMB6MNkeFKx//y84yqv9rMq1CGMrYFdvFEqUffNO/7zum7x1EM/DxTPS/7TpuyTlzb GPT1m1B3G8WbUj++LkArbZ2Eog6GPYAylgOgvutr26WRePnVmJmNWUscw5lQFEGWwadi 9It9JIS+Pj8Spvyk2e8BDd6TojInypHOjao8YWYtF/9TPcnHnFoFknF52qlv2EYWtcUb 6iOKXU8LRkDHyPF8hIZhWhKVtsI0a6ypSsLS1NHHAkdRKthzjt2ooDFbvPdvxXKlYLPT HREA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=uHvnKiO8snaK7XgZ58nYTEBNaL7YHBVtouxxBqKreug=; b=Q4LP7Gm/zs0ZZx/Z/AXMXqgJttyPaAeBZ8GZofxshBIPuyZqZSVJ+nL6A6V7Ppv8qT zNoMzh4AE1cJ61mda4DpYnwjEmOhaho4486EE655N8JrhEOqZRGjs4A6a1D7qu/Hnts7 fodrjRzrT2DxILaatYvLmnCFOxjiz0+ieofAZ2ztAkIf3QxsJwfSD4Pc+tQU3wqZ/3wL OjZPdmGbjLBzyqQJLp6XBIWyi2raJFA9qdCGIt/ZqcHcstjJ9+Iwvrrp+dWKJK64FAMc LnKzqZFL6K3oWNBwOnnF8tad49WwZLMKKedf2zpUfPvPmHAUtQSsJN68lFEyKN/vB1ie PigQ== X-Gm-Message-State: AJaThX7PRvMpVNnVMV+kTu2UgdlC6YnLiCwuoqPQqa7MILHSvubOqf7U 3hxPN4IBBIDGICVayv5EVYQH28graH34RrWpYUDkmA== X-Google-Smtp-Source: AGs4zMYgpu/3EZekSzlA5+4EcvafYQAskE93rNDQPoiZSKDpi+cIdkiKiNf1/rHQyHLhSUzw4e7Pgf5IimANJuiCDqU= X-Received: by 10.31.110.9 with SMTP id j9mr1727364vkc.47.1510265292257; Thu, 09 Nov 2017 14:08:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.57.88 with HTTP; Thu, 9 Nov 2017 14:07:31 -0800 (PST) In-Reply-To: References: From: Michael McCandless Date: Thu, 9 Nov 2017 17:07:31 -0500 Message-ID: Subject: Re: Lucene 6.1.0 index upgrade To: Lucene Users , Kannan.Krishnamurthy@cengage.com Content-Type: multipart/alternative; boundary="94eb2c14a21e43121c055d940a72" archived-at: Thu, 09 Nov 2017 22:08:17 -0000 --94eb2c14a21e43121c055d940a72 Content-Type: text/plain; charset="UTF-8" Maybe try the addIndexes method that takes CodecReader[] instead? It will be somewhat slower, since it fully reads and writes the index, but it should work across major versions? Mike McCandless http://blog.mikemccandless.com On Thu, Nov 9, 2017 at 3:59 PM, Krishnamurthy, Kannan < Kannan.Krishnamurthy@cengage.com> wrote: > Greetings. > > > We are currently using Lucene 6.1.0, our typical index size is ~ 200GB and > we are planning to move to Lucene 7.0.0. > > > Our daily indexing workflow currently uses IndexWriter.addIndexes() to add > an index(this will be on Lucene 7.0.0) to a copy of the of the 200GB index. > Further it calls IndexWriter.forceMerge(1) to create a single segment. The > addIndexes() now doesn't support different versions of index. > > We are facing an issue in upgrading to Lucene 7.0.0 due to this > limitation. We couldn't afford to do full reindex as there about 50 > different indexes ~ 200GB each. > > > We tried using the LuceneUpgrade tool to upgrade our index to latest > version, however the IndexCreatedVersionMajor is still LUCENE_6_1_0.major, > This is preventing us calling IndexWriter.addIndexes() post upgrade. > > > I am wondering what are our options to upgrade without doing a full > reindex and to continue to use IndexWriter.addIndexes() post upgrade. > > The code snippet below shows the different api calls we make. > > > > @Test > public void addIndexWith7SegmentToDirectoryOnUpgradedSegment() throws > IOException { > IndexUpgrader upgrader = new IndexUpgrader(lucene610Dir); // lucene 6.1.0 > directory 200 GB > upgrader.upgrade(); > > IndexWriter w = new IndexWriter(lucene610Dir, newIndexWriterConfig()); > exception.expect(IllegalArgumentException.class); > exception.expectMessage( > CoreMatchers.containsString("Cannot use addIndexes(Directory) with > indexes that have been created by a different Lucene version")); > w.addIndexes(lucene700Dir); // lucene 7.0.0 daily index > w.forceMerge(1); > w.close(); > } > > Let me know if you need more details. > > > Many thanks > > Kannan. > > --94eb2c14a21e43121c055d940a72--