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 1CDCA110D0 for ; Tue, 15 Apr 2014 23:21:39 +0000 (UTC) Received: (qmail 38718 invoked by uid 500); 15 Apr 2014 23:21:33 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 38587 invoked by uid 500); 15 Apr 2014 23:21:33 -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 38579 invoked by uid 99); 15 Apr 2014 23:21:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 23:21:33 +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 erickerickson@gmail.com designates 209.85.220.169 as permitted sender) Received: from [209.85.220.169] (HELO mail-vc0-f169.google.com) (209.85.220.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 23:21:28 +0000 Received: by mail-vc0-f169.google.com with SMTP id ik5so10221414vcb.0 for ; Tue, 15 Apr 2014 16:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=a3PwRwjeF9gZ+j6MC/ap8gPIOK/eAZE7NvizVpV+OXc=; b=bC2I8v/kUgB/EObieJgIST937vpAE5ATmAzh7UcXCMUDSoEFqZsvjGTC68/chi1kx4 kLojP2qOdR3TtcBuHmH/k7zbl5kQApkrs5uxtumW3LN6kPUhHShFR9roohP5iKF42pWY RNyiXEczov05zbpYyJlzOc9F3XQr5uLpUzrX0MLKenEw5Ztd4eZDXpnaV62jG1GfUSNB C0YOwjXijNPCCVcZWzVHRmi53Tl8D4x39r+uSS+x8Da/wOsKjxMmzlSnXXoDn0+YCUKL IO3gZUoBiClCstsstohiueqDMsSWrvTr41LP017FUkka8NyYAWbZS5VUUakipFqFud+E z9FA== MIME-Version: 1.0 X-Received: by 10.221.74.200 with SMTP id yx8mr276012vcb.3.1397604067989; Tue, 15 Apr 2014 16:21:07 -0700 (PDT) Received: by 10.52.69.234 with HTTP; Tue, 15 Apr 2014 16:21:07 -0700 (PDT) In-Reply-To: <66830ebd69374033b875b822ea0bbfac@CO1PR04MB444.namprd04.prod.outlook.com> References: <66830ebd69374033b875b822ea0bbfac@CO1PR04MB444.namprd04.prod.outlook.com> Date: Tue, 15 Apr 2014 19:21:07 -0400 Message-ID: Subject: Re: cache warming questions From: Erick Erickson To: solr-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org bq: What does it mean that items will be regenerated or prepopulated from the current searcher's cache... You're right, the values aren't cached. They can't be since the internal Lucene document id is used to identify docs, and due to merging the internal ID may bear no relation to the old internal ID for a particular document. I find it useful to think of Solr's caches as a map where the key is the "query" and the value is some representation of the found documents. The details of the value don't matter, so I'll skip them. What matters is the key. Consider the filter cache. You put something like &fq=3Dprice:[0 TO 100] on a URL. Solr then uses the fq clause as the key to the filterCache. Here's the sneaky bit. When you specify an autowarm count of N for the filterCache, when a new searcher is opened the first N keys from the map are re-executed in the new searcher's context and the results put into the new searcher's filterCache. bq: ...how does auto warming and explicit warming work together? They're orthogonal. IOW, the autowarming for each cache is executed as well as the newSearcher static warming queries. Use the static queries to do things like fill the sort caches etc. Incidentally, this bears on why there's a "firstSearcher" and "newSearcher". The newSearcher queries are run in addition to the cache autowarms. firstSearcher static queries are only run when a Solr server is started the first time, and there are no cache entries to autowarm. So the firstSearcher queries might be quite a bit more complex than newSearcher queries. HTH, Erick On Tue, Apr 15, 2014 at 1:55 PM, Matt Kuiper wrote= : > Hello, > > I have a few questions regarding how Solr caches are warmed. > > My understanding is that there are two ways to warm internal Solr caches = (only one way for document cache and lucene FieldCache): > > Auto warming - occurs when there is a current searcher handling requests = and new searcher is being prepared. "When a new searcher is opened, its ca= ches may be prepopulated or "autowarmed" with cached object from caches in = the old searcher. autowarmCount is the number of cached items that will be = regenerated in the new searcher." http://wiki.apache.org/solr/SolrCachin= g#autowarmCount > > Explicit warming - where the static warming queries specified in Solrconf= ig.xml for newSearcher and firstSearcher listeners are executed when a new = searcher is being prepared. > > What does it mean that items will be regenerated or prepopulated from the= current searcher's cache to the new searcher's cache? I doubt it means co= py, as the index has likely changed with a commit and possibly invalidated = some contents of the cache. Are the queries, or filters, that define the c= ontents of the current caches re-executed for the new searcher's caches? > > For the case where auto warming is configured, a current searcher is acti= ve, and static warming queries are defined how does auto warming and explic= it warming work together? Or do they? Is only one type of warming activate= d to fill the caches? > > Thanks, > Matt