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 9BD6F117C6 for ; Tue, 17 Jun 2014 05:29:25 +0000 (UTC) Received: (qmail 22766 invoked by uid 500); 17 Jun 2014 05:29:23 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 22705 invoked by uid 500); 17 Jun 2014 05:29:23 -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 22693 invoked by uid 99); 17 Jun 2014 05:29:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2014 05:29:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of serera@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2014 05:29:18 +0000 Received: by mail-we0-f175.google.com with SMTP id k48so5784651wev.6 for ; Mon, 16 Jun 2014 22:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Z9bv3NlKRuOr8m9Hrl/t8OkWSyl5NEdyp6ErX4hO3W8=; b=aThWXBSKmZkspwUVAnJxmtipMlaa/rL62Dox/is28SMMRkvBFAXYwGpitpNkqpU3tQ R2MHRraXuQ5Ul2rwZ6p4l/pZyI8dG1/4tvBZalzk24QKnn2TRmfRJCtyefBLno3KE6H3 7nIRjRi2eLsD8llCYmEdlyzAVwUAx0EKWQ+Z0366IY4yMMGW3sV3T1lRbJqG+Pyi4IGb Yz4KgK7d4PRyqdzJcLICI99jS5eoX/TOx6RyMrAZT4HMF5RI6Bvz135uBIqN+KuznYvy QmRf7HRd4l7x56Of2puhh8ifGfeW9GvsX2DYz6wkvv+M5tisMzV0y1wAvJdzkTEf/d4U Bdsg== X-Received: by 10.180.99.166 with SMTP id er6mr33116541wib.48.1402982937054; Mon, 16 Jun 2014 22:28:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.8.97 with HTTP; Mon, 16 Jun 2014 22:28:36 -0700 (PDT) In-Reply-To: References: From: Shai Erera Date: Tue, 17 Jun 2014 08:28:36 +0300 Message-ID: Subject: Re: SortingMergePolicy for already sorted segments To: "java-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=f46d04428ef696d22a04fc016ba7 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04428ef696d22a04fc016ba7 Content-Type: text/plain; charset=UTF-8 I'm not sure that I follow ... where do you see DocMap being loaded up front? Specifically, Sorter.sort may return null of the readers are already sorted ... I think we already optimized for the case where the readers are sorted. Shai On Tue, Jun 17, 2014 at 4:04 AM, Ravikumar Govindarajan < ravikumar.govindarajan@gmail.com> wrote: > I am planning to use SortingMergePolicy where all the merge-participating > segments are already sorted... I understand that I need to define a DocMap > with old-new doc-id mappings. > > Is it possible to optimize the eager loading of DocMap and make it kind of > lazy load on-demand? > > Ex: Pass List to the caller and ask for next new-old doc > mapping.. > > Since my segments are already sorted, I could save on memory a little-bit > this way, instead of loading the full DocMap upfront > > -- > Ravi > --f46d04428ef696d22a04fc016ba7--