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 9B01C17C20 for ; Fri, 2 Oct 2015 08:23:48 +0000 (UTC) Received: (qmail 78670 invoked by uid 500); 2 Oct 2015 08:23:41 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 78604 invoked by uid 500); 2 Oct 2015 08:23:41 -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 78593 invoked by uid 99); 2 Oct 2015 08:23:40 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2015 08:23:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 869DF1A0712 for ; Fri, 2 Oct 2015 08:23:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.101 X-Spam-Level: ** X-Spam-Status: No, score=2.101 tagged_above=-999 required=6.31 tests=[KAM_COUK=1.1, KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XrAM1xWV9HI5 for ; Fri, 2 Oct 2015 08:23:29 +0000 (UTC) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id C21AF42B51 for ; Fri, 2 Oct 2015 08:23:28 +0000 (UTC) Received: by wicgb1 with SMTP id gb1so22031626wic.1 for ; Fri, 02 Oct 2015 01:23:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=RmPtH6+kmnHAOiJZZfWsjk4F28P31N1kclbLXe9kaSw=; b=Lz9RU5eYdBn1HBoyaIP1G/XpHbwfWG+eXjcM2UZ0/hLxkwWzYaSGS2dUVzWu6iUrPq sF6l26pE54CDkYcnG1yjJM4KCis4P8baMVK/UHyG7Bcn/Jo+SWOVS6ZDG1K+YNEngIkY RUQa2KkngSxlkVC17EXWt0K9pUp2b0d1xIyjmR51zmODH4kXpOzgaB9AHLreeER5hJxs LDwq3NSss8HqOh4wVBaS3CHrPKNUTcddwcPY7Sw8a+Z2Ffc/eCnZ12pa4GwKJAhR+NMn 0PSvLs0Rkg8AqEuXoLz9hMKRII4THja75OTzxsOAF4ODRzlv0PNHPSH1vCat5CNxjYAX o2Cg== X-Gm-Message-State: ALoCoQk2w0C/H7FtlhbiTEvFd+bhnlwnS8kcOvnr9FBrrrvB+O4COz9jC3lMv9tTPeK9csgfQIPM X-Received: by 10.194.84.42 with SMTP id v10mr16743598wjy.1.1443774207844; Fri, 02 Oct 2015 01:23:27 -0700 (PDT) Received: from [192.168.1.72] ([31.185.128.212]) by smtp.googlemail.com with ESMTPSA id wn10sm10074637wjc.46.2015.10.02.01.23.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Oct 2015 01:23:26 -0700 (PDT) Subject: Re: Facet queries blow out the filterCache To: solr-user@lucene.apache.org References: From: Charlie Hull Message-ID: <560E3F03.6000206@flax.co.uk> Date: Fri, 2 Oct 2015 09:23:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 01/10/2015 23:31, Jeff Wartes wrote: > It still inserts if I address the core directly and use distrib=false. > > I’ve got a few collections sharing the same config, so it’s surprisingly > annoying to > change solrconfig.xml right now, but it seemed pretty clear the query is > the thing being cached, since > the cache size only changes when the query does. Hi Jeff, I think you may be hitting the same issue we found: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201409.mbox/%3CCAGe-MLJ+6y1at+OunK3sGaCFF6zGtJq_Nin9_3SHN0kFuqXkBA@mail.gmail.com%3E Distributed faceting uses the filter cache, where you wouldn't expect it to. The solution was to set facet.limit to -1. Best Charlie > > > > On 10/1/15, 3:01 PM, "Mikhail Khludnev" wrote: > >> hm.. >> This option was useful for introspecting cache content >> https://wiki.apache.org/solr/SolrCaching#showItems It might help you to >> find-out a cause. >> I'm still blaming distributed requests, it expained here >> https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-Over-Re >> questParameters >> eg does it happen if you run with distrib=false? >> >> On Fri, Oct 2, 2015 at 12:27 AM, Jeff Wartes >> wrote: >> >>> >>> No change, still shows an insert per-request. As does a simplified >>> request >>> with only the facet params >>> "&facet.field=city&facet=true" >>> >> by default it's 100 >> https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-Theface >> t.limitParameter >> and can cause filtering by values, it can be seen in logs, btw. >> >>> >>> It’s definitely facet related though, facet=false eliminates the insert. >>> >>> >>> >>> On 10/1/15, 1:50 PM, "Mikhail Khludnev" >>> wrote: >>> >>>> what if you set f.city.facet.limit=-1 ? >>>> >>>> On Thu, Oct 1, 2015 at 7:43 PM, Jeff Wartes >>>> wrote: >>>> >>>>> >>>>> I’m doing some fairly simple facet queries in a two-shard 5.3 >>> SolrCloud >>>>> index on fields like this: >>>>> >>>>> >>>> docValues="true”/> >>>>> >>>>> that look something like this: >>>>> >>> >>>>> q=...&fl=id,score&facet.field=city&facet=true&f.city.facet.mincount=1&f >>>>> .c >>>>> it >>>>> y.facet.limit=50&rows=0&start=0&facet.method=fc >>>>> >>>>> (no, NOT facet.method=enum - the usage of the filterCache there is >>>>> pretty >>>>> well documented) >>>>> >>>>> Watching the filterCache stats, it appears that every one of these >>>>> queries >>>>> causes the "inserts" counter to be incremented by one. Distinct "q=" >>>>> queries also increase the "size", and eviction happens as normal. If >>> I >>>>> repeat the same query a few times, "lookups" is not incremented, so >>>>> these >>>>> entries generally appear to be completely wasted. (Although when >>>>> running a >>>>> lot of these queries, it appears as though a very small set also >>>>> increment >>>>> the "lookups" counter, but only a small set, and I haven’t figured >>> out >>>>> why >>>>> some are special.) >>>>> >>>>> So the question is, why does this facet query have anything to do >>> with >>>>> the >>>>> filterCache? This causes a huge amount of filterCache churn with no >>>>> apparent benefit. >>>>> >>>>> >>>> >>>> >>>> -- >>>> Sincerely yours >>>> Mikhail Khludnev >>>> Principal Engineer, >>>> Grid Dynamics >>>> >>>> >>>> >>> >>> >> >> >> -- >> Sincerely yours >> Mikhail Khludnev >> Principal Engineer, >> Grid Dynamics >> >> >> > -- Charlie Hull Flax - Open Source Enterprise Search tel/fax: +44 (0)8700 118334 mobile: +44 (0)7767 825828 web: www.flax.co.uk