From dev-return-69269-apmail-lucene-dev-archive=lucene.apache.org@lucene.apache.org Mon May 2 08:51:45 2011 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 CEC4C3B53 for ; Mon, 2 May 2011 08:51:45 +0000 (UTC) Received: (qmail 88623 invoked by uid 500); 2 May 2011 08:51:44 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 88570 invoked by uid 500); 2 May 2011 08:51:44 -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 88559 invoked by uid 99); 2 May 2011 08:51:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 08:51:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 08:51:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7BBC5BD66E for ; Mon, 2 May 2011 08:51:03 +0000 (UTC) Date: Mon, 2 May 2011 08:51:03 +0000 (UTC) From: "Chris Male (JIRA)" To: dev@lucene.apache.org Message-ID: <1197213781.14862.1304326263503.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <2005206160.13499.1304160723155.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3056) Support Query Rewriting Caching MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027592#comment-13027592 ] Chris Male commented on LUCENE-3056: ------------------------------------ bq. This change somewhat depends on LUCENE-3041 since we might wanna pass that RewriteContext on a per segment level right? Yeah, thats very true. I'm wondering whether its best to rethink the signatures of the #search methods in IS since we need to incorporate both this and LUCENE-3041. I'll upload a patch shortly addressing the other improvements. > Support Query Rewriting Caching > ------------------------------- > > Key: LUCENE-3056 > URL: https://issues.apache.org/jira/browse/LUCENE-3056 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: 4.0 > Reporter: Chris Male > Fix For: 4.0 > > Attachments: LUCENE-3056.patch > > > Out of LUCENE-3041, its become apparent that using a Visitor / Walker isn't right for caching the rewrites of Querys. Although we still intend to introduce the Query / Walker for advanced query transformations, rewriting still serves a purpose for very specific implementation detail writing. As such, it can be very expensive. So I think we should introduce first class support for rewrite caching. I also feel the key is to make the caching as transparent as possible, to reduce the strain on Query implementors. > The TermState idea gave me the idea of maybe making a RewriteState / RewriteCache / RewriteInterceptor, which would be consulted for rewritten Querys. It would then maintain an internal cache that it would check. If a value wasn't found, it'd then call Query#rewrite, and cache the result. > By having this external rewrite source, people could 'pre' rewrite Querys if they were particularly expensive but also common. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org