Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DBEB103E7 for ; Mon, 3 Mar 2014 16:15:50 +0000 (UTC) Received: (qmail 5284 invoked by uid 500); 3 Mar 2014 16:15:45 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 5152 invoked by uid 500); 3 Mar 2014 16:15:44 -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 5027 invoked by uid 99); 3 Mar 2014 16:15:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 16:15:43 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of greggny3@gmail.com designates 209.85.219.51 as permitted sender) Received: from [209.85.219.51] (HELO mail-oa0-f51.google.com) (209.85.219.51) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 16:15:39 +0000 Received: by mail-oa0-f51.google.com with SMTP id i4so3487928oah.38 for ; Mon, 03 Mar 2014 08:15:18 -0800 (PST) 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=GsHLKcG1eiQu2FYtuP+B/D6HV93a1Qm9R/3ME9DvbBI=; b=NXUbdqLI3/eAcBzonegwEWGZJ2i/sa7gd8Zx61vpGw3sH0+GlB9JW2phCqpIGFVqOu ojZpukMXyQoQjshpNctB7TbTL5m07WygF+UIpl2QqK/17Q7AoxjPx09pRt0zE7NIK/J+ AmFHxrC7cOVeCDFKYU7MfgPXA8jXqdurQeKml3ewUE4bGMmqf299RuzmCONGUD0Usc89 AwrT40TAWJqIjkPHJ55JFLrGJ9/0JL99HUBmLgDmNklz9CVVrR++mkUhzAfiP5W7SFzk Uz6WXTJERrbOsWLIjBWVkoZhzWNd16g+jrxwSZ5zdlle30v5rpcgTM4aN/nxfpLVfC7U FjWw== X-Received: by 10.60.159.137 with SMTP id xc9mr16916682oeb.31.1393863318484; Mon, 03 Mar 2014 08:15:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.10.74 with HTTP; Mon, 3 Mar 2014 08:14:58 -0800 (PST) In-Reply-To: References: From: Gregg Donovan Date: Mon, 3 Mar 2014 11:14:58 -0500 Message-ID: Subject: Re: Fetching uniqueKey and other int quickly from documentCache? To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=047d7bd6a9aef70b8704f3b61705 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd6a9aef70b8704f3b61705 Content-Type: text/plain; charset=ISO-8859-1 Yonik, That's a very clever idea. Unfortunately, I think that will skip the distributed query optimization we were hoping to take advantage of in SOLR-1880 [1], but it should work with the proposed distrib.singlePass optimization in SOLR-5768 [2]. Does that sound right? --Gregg [1] https://issues.apache.org/jira/browse/SOLR-1880 [2] https://issues.apache.org/jira/browse/SOLR-5768 On Wed, Feb 26, 2014 at 8:53 PM, Yonik Seeley wrote: > You could try forcing things to go through function queries (via > pseudo-fields): > > fl=field(id), field(myfield) > > If you're not requesting any stored fields, that *might* currently > skip that step. > > -Yonik > http://heliosearch.org - native off-heap filters and fieldcache for solr > > > On Mon, Feb 24, 2014 at 9:58 PM, Gregg Donovan wrote: > > We fetch a large number of documents -- 1000+ -- for each search. Each > > request fetches only the uniqueKey or the uniqueKey plus one secondary > > integer key. Despite this, we find that we spent a sizable amount of time > > in SolrIndexSearcher#doc(int docId, Set fields). Time is spent > > fetching the two stored fields, LZ4 decoding, etc. > > > > I would love to be able to tell Solr to always fetch these two fields > from > > memory. We have them both in the fieldCache so we're already spending the > > RAM. I've seen this asked previously [1], so it seems like a fairly > common > > need, especially for distributed search. Any ideas? > > > > A few possible ideas I had: > > > > --Check FieldCache.html#getCacheEntries() before going to stored fields. > > --Give the documentCache config a list of fields it should load from the > > fieldCache > > > > > > Having an in-memory mapping from docId->uniqueKey has come up for us > > before. We've used a custom SolrCache maintaining that mapping to quickly > > filter over personalized collections. Maybe the uniqueKey should be more > > optimized out of the box? Perhaps a custom "uniqueKey" codec that also > > maintained the docId->uniqueKey mapping in memory? > > > > --Gregg > > > > [1] http://search-lucene.com/m/oCUKJ1heHUU1 > --047d7bd6a9aef70b8704f3b61705--