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 388CD200B65 for ; Wed, 17 Aug 2016 19:23:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3704E160A8C; Wed, 17 Aug 2016 17:23:16 +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 7E612160A6C for ; Wed, 17 Aug 2016 19:23:15 +0200 (CEST) Received: (qmail 86886 invoked by uid 500); 17 Aug 2016 17:23:13 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 86870 invoked by uid 99); 17 Aug 2016 17:23:13 -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; Wed, 17 Aug 2016 17:23:13 +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 22CC3C041B for ; Wed, 17 Aug 2016 17:23:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.179 X-Spam-Level: X-Spam-Status: No, score=0.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_LIVE=1, 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-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 qhgu_atfPXrd for ; Wed, 17 Aug 2016 17:23:09 +0000 (UTC) Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 8C50C5FC0E for ; Wed, 17 Aug 2016 17:23:09 +0000 (UTC) Received: by mail-oi0-f54.google.com with SMTP id c15so146299156oig.0 for ; Wed, 17 Aug 2016 10:23:09 -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; bh=LgkroFezVd+uqNTCPNiJnFTW1gxORjJtzrxUQCYsUAQ=; b=X27ssV3WQDBzlZmgM4sGcInrQVvonnZArNG+PQNJhVupRgMZHRuynBfqKf17PFxLUY /rCRSO54YuHtLapDodlgB11HYD35TIBNzjYt1ve1tkgfN6EvjWci+gMzi9BwgYTwtmez wMTnA80/yacTUeZaopnbYRUiqFENJAlig2CJxSerlG02XKV7bumnfEZAwWIQ25UFey8+ 2P+RpoKWKU2DFfl5MHhU1IBux9t+DMIL1cqvG7c4y3XogLmhqaEMES/tAZhgijmWXHHR 9ppfmXwyjDIxrO2pfXDAq9burm3FAib5BASoFHDsBwz2XG+x8EzFuhC5oYYgoa86LOEu nVGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=LgkroFezVd+uqNTCPNiJnFTW1gxORjJtzrxUQCYsUAQ=; b=AbM8UXMpHZ1Xj8IzUZNb4TUIOHr/XY5D+9GQ32rGdTYi55zvkP8cPbf1ho8AJOh5N+ 01055bACXncLzprK56Y/tLBOpIjT2Y9719Iy/NbKMR1uo8How1PMgrUclq/tc/sy+r4c Ql7szAIbpxvMCiWylHmMSFlZFFxExoZO6v/CzZfGttjnEKxHCkmkaqo8/8foX8X6+G3w LtGY5/DgzQ13DUvavPfdI1NDavGJhBBG/BTJMN3GmntySCps7tplt9ys9erp1c7f7lmS 0FY2/WUjlrnP9w6ho2zoZsM+KPObHLz+lecS7IpXrhuf1sJD5y8PeU7a9EdeC7AHeyQF k8aA== X-Gm-Message-State: AEkoousOncaQiKvKAp39Fwve0/XdsKaFfXjQtukAW2TMFKqsxrfOiwPYdyfd+LZKRXr+15Njxop/aCWdHnn+0Q== X-Received: by 10.157.7.229 with SMTP id 92mr20907750oto.133.1471454583510; Wed, 17 Aug 2016 10:23:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.45.38 with HTTP; Wed, 17 Aug 2016 10:22:43 -0700 (PDT) In-Reply-To: References: From: Roman Chyla Date: Wed, 17 Aug 2016 13:22:43 -0400 Message-ID: Subject: Re: The most efficient way to get un-inverted view of the index? To: "solr-user@lucene.apache.org" Content-Type: text/plain; charset=UTF-8 archived-at: Wed, 17 Aug 2016 17:23:16 -0000 Joel, thanks, but which of them? I've counted at least 4, if not more, different ways of how to get DocValues. Are there many functionally equal approaches just because devs can't agree on using one api? Or is there a deeper reason? Btw, the FieldCache is still there - both in lucene (to be deprecated) and in solr; but became package accessible only This is what removed the FieldCache: https://issues.apache.org/jira/browse/LUCENE-5666 This is what followed: https://issues.apache.org/jira/browse/SOLR-8096 And there is still code which un-inverts data from an index if no doc-values are available. --roman On Tue, Aug 16, 2016 at 9:54 PM, Joel Bernstein wrote: > You'll want to use org.apache.lucene.index.DocValues. The DocValues api has > replaced the field cache. > > > > > > Joel Bernstein > http://joelsolr.blogspot.com/ > > On Tue, Aug 16, 2016 at 8:18 PM, Roman Chyla wrote: > >> I need to read data from the index in order to build a special cache. >> Previously, in SOLR4, this was accomplished with FieldCache or >> DocTermOrds >> >> Now, I'm struggling to see what API to use, there is many of them: >> >> on lucene level: >> >> UninvertingReader.getNumericDocValues (and others) >> .getNumericValues() >> MultiDocValues.getNumericValues() >> MultiFields.getTerms() >> >> on solr level: >> >> reader.getNumericValues() >> UninvertingReader.getNumericDocValues() >> and extensions to FilterLeafReader - eg. very intersting, but >> undocumented facet accumulators (ex: NumericAcc) >> >> >> I need this for solr, and ideally re-use the existing cache [ie. the >> special cache is using another fields so those get loaded only once >> and reused in the old solr; which is a win-win situation] >> >> If I use reader.getValues() or FilterLeafReader will I be reading data >> every time the object is created? What would be the best way to read >> data only once? >> >> Thanks, >> >> --roman >>