Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59B2D9903 for ; Thu, 23 Feb 2012 18:32:51 +0000 (UTC) Received: (qmail 24077 invoked by uid 500); 23 Feb 2012 18:32:50 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 24033 invoked by uid 500); 23 Feb 2012 18:32:50 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 24026 invoked by uid 99); 23 Feb 2012 18:32:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 18:32:50 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ryantxu@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-tul01m020-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 18:32:43 +0000 Received: by obbwd18 with SMTP id wd18so2658838obb.35 for ; Thu, 23 Feb 2012 10:32:23 -0800 (PST) Received-SPF: pass (google.com: domain of ryantxu@gmail.com designates 10.182.182.100 as permitted sender) client-ip=10.182.182.100; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ryantxu@gmail.com designates 10.182.182.100 as permitted sender) smtp.mail=ryantxu@gmail.com; dkim=pass header.i=ryantxu@gmail.com Received: from mr.google.com ([10.182.182.100]) by 10.182.182.100 with SMTP id ed4mr1021960obc.24.1330021943201 (num_hops = 1); Thu, 23 Feb 2012 10:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=/PGuAPjv+EtMyRqO0WY5GaKRKNmkaLmBlrgYvG+/mAc=; b=e9fpRwzq1ZBJryq4gD44sdNVR9gpUag6YduLfPl2eAvv2PTI75CMFqlnEAKFd0BkIu Z2VEsypkpAtHAkQ3hB1Z0E9xLR6uOmb3sXLG3Xj9nHomPqU14NS0qALp8w2FG+drjKpL SrJU+ybu5rpp67HAq3X6muihFs4wr7Pc955NY= MIME-Version: 1.0 Received: by 10.182.182.100 with SMTP id ed4mr876831obc.24.1330021943146; Thu, 23 Feb 2012 10:32:23 -0800 (PST) Received: by 10.182.88.2 with HTTP; Thu, 23 Feb 2012 10:32:23 -0800 (PST) Date: Thu, 23 Feb 2012 10:32:23 -0800 Message-ID: Subject: FieldCache future? From: Ryan McKinley To: dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 In LUCENE-3360, there is discussion that DocValues could be used to replace the existing FieldCache. This seems like is a great direction, but I am not sure how people see this getting implemented. Is the suggestion to add something like: DocValues fieldCache(String field); to AtomicReader? or maybe: DocValues fieldCache(String field, Parser parser, boolean setDocsWithField) In both cases, I assume the Reader would cache the results in an internal Map. When thinking about the FieldCache future, the key things I hope we can support are: 1. multi-valued fields 2. user defined Parser. (the BytesRef can represent some arbitrary object) In particular, I am trying to find a better solution then a WeakHashMap for something like: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3795_lsp_spatial_module/modules/spatial/strategy/src/java/org/apache/lucene/spatial/strategy/util/ShapeFieldCacheProvider.java Is this the general direction you guys see? ryan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org