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 10333DF3E for ; Thu, 20 Sep 2012 12:32:12 +0000 (UTC) Received: (qmail 53404 invoked by uid 500); 20 Sep 2012 12:32:10 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 52925 invoked by uid 500); 20 Sep 2012 12:32:09 -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 52813 invoked by uid 99); 20 Sep 2012 12:32:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2012 12:32:09 +0000 Date: Thu, 20 Sep 2012 23:32:09 +1100 (NCT) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Message-ID: <1235531475.102176.1348144329229.JavaMail.jiratomcat@arcas> In-Reply-To: <422381909.101673.1348135088393.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (LUCENE-4410) Make FilteredQuery more flexible with regards to how filters are applied MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459556#comment-13459556 ] Uwe Schindler commented on LUCENE-4410: --------------------------------------- Hi, I am also against rushing this in with 4.0. There is no slowdown in comparison to Lucene 3.6. My problems are also in the patch: - I hate the crazy not-really-random access Bits impl in the DocFirstStrategy! It is definitely not random access, so it violates the contract. In this case the standard LeapFrog approach should be used (if not random access DocIdSet). - I dont really see an improvement. The Bits interface is not allowed to throw IOException, so the filter should *only* return a Bits interface if its a very fast random access implementation. In all other cases the filter must not suport Bits and then LeapFrog has to be used. - I would only see an improvement if the method Filter.getDocIdSet() is only called after the scorer hit the first document - but this does not work with random access. This was also not done in 3.6, so we should not rush. > Make FilteredQuery more flexible with regards to how filters are applied > ------------------------------------------------------------------------ > > Key: LUCENE-4410 > URL: https://issues.apache.org/jira/browse/LUCENE-4410 > Project: Lucene - Core > Issue Type: Improvement > Components: core/search > Affects Versions: 4.0-BETA > Reporter: Simon Willnauer > Fix For: 5.0, 4.0 > > Attachments: LUCENE-4410.patch > > > Currently FilteredQuery uses either the "old" lucene 3 leap frog approach or pushes the filter down together with accepted docs. Yet there might be more strategies required to fit common usecases like geo-filtering where a rather costly function is applied to each document. Using leap frog this might result in a very slow query if the filter is advanced since it might have linear running time to find the next valid document. We should be more flexible with regards to those usecases and make it possible to either tell FQ what to do or plug in a strategy that applied a filter in a different way. > The current FQ impl also uses an heuristic to decide if RA or LeapFrog should be used. This is really an implementation detail of the strategy and not of FQ and should be moved out. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators 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