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 29F3B10534 for ; Thu, 24 Oct 2013 14:36:21 +0000 (UTC) Received: (qmail 26124 invoked by uid 500); 24 Oct 2013 14:36:11 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 26036 invoked by uid 500); 24 Oct 2013 14:36:09 -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 25958 invoked by uid 99); 24 Oct 2013 14:36:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2013 14:36:07 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of solr@elyograg.org designates 166.70.79.219 as permitted sender) Received: from [166.70.79.219] (HELO frodo.elyograg.org) (166.70.79.219) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Oct 2013 14:36:01 +0000 Received: from localhost (localhost [127.0.0.1]) by frodo.elyograg.org (Postfix) with ESMTP id 8046D26FA for ; Thu, 24 Oct 2013 08:35:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=elyograg.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=mail; t=1382625339; bh=AVPj1OzMrOIZdfmJ1/uUUkyfF3tNlGd0Kw2Htv/oq1g=; b=p1vHzjnk7x5J 5EhYOKFTMPulNiy140vTaJ5snfehquksmhU7ybk7uYpeWiC7o2frPFz7PlNl6Rkp uXqVp8LcWDlu96Xyl0yMlouuFILpc6l616CZ5pG56YK8sjuRx5nkYBTGEVp5U8qF tARnijfcZkPYOLhG2HdweG2Fbs8SlbA= X-Virus-Scanned: Debian amavisd-new at frodo.elyograg.org Received: from frodo.elyograg.org ([127.0.0.1]) by localhost (frodo.elyograg.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Wyx3NPcDNbNJ for ; Thu, 24 Oct 2013 08:35:39 -0600 (MDT) Received: from [192.168.1.102] (102.int.elyograg.org [192.168.1.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: elyograg@elyograg.org) by frodo.elyograg.org (Postfix) with ESMTPSA id D7099AE6 for ; Thu, 24 Oct 2013 08:35:39 -0600 (MDT) Message-ID: <52693049.40808@elyograg.org> Date: Thu, 24 Oct 2013 08:35:53 -0600 From: Shawn Heisey User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: solr-user@lucene.apache.org Subject: Re: Query & result caching with custom functions References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 10/24/2013 5:35 AM, Mathias Lux wrote: > I've written a custom function, which is able to provide a distance > based on some DocValues to re-sort result lists. This basically works > great, but we've got the problem that if I don't change the query, but > the function parameters, Solr delivers a cached result without > re-ordering. I turned off caching and see there, problem solved. But > of course this is not a avenue I want to pursue further as it doesn't > make sense for a prodcutive system. > > Do you have any ideas (beyond fake query modification and turning off > caching) to counteract? > > btw. I'm using Solr 4.4 (so if you are aware of the issue and it has > been resolved in 4.5 I'll port it :) The code I'm using is at > https://bitbucket.org/dermotte/liresolr I suspect that the queryResultCache is not paying attention to the fact that parameters for your plugin have changed. This probably means that your plugin must somehow inform the "cache check" code that something HAS changed. How you actually do this is a mystery to me because it involves parts of the code that are beyond my understanding, but it MIGHT involve making sure that parameters related to your code are saved as part of the entry that goes into the cache. Thanks, Shawn