Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 66125 invoked from network); 11 Nov 2010 16:25:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Nov 2010 16:25:09 -0000 Received: (qmail 81949 invoked by uid 500); 11 Nov 2010 16:25:39 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 81891 invoked by uid 500); 11 Nov 2010 16:25:38 -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 81884 invoked by uid 99); 11 Nov 2010 16:25:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 16:25:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 16:25:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oABGPEkn020347 for ; Thu, 11 Nov 2010 16:25:14 GMT Message-ID: <17497366.28721289492714031.JavaMail.jira@thor> Date: Thu, 11 Nov 2010 11:25:14 -0500 (EST) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2754) add spanquery support for all multitermqueries In-Reply-To: <7553028.25941289483173470.JavaMail.jira@thor> 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-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931070#action_12931070 ] Robert Muir commented on LUCENE-2754: ------------------------------------- bq. What about the third BQ rewrite mode (is it needed or is scoring different (we have two rerwite modes for fuzzy)? In this case, i thought not because it would be constant score queries, not spanqueries. I think a constant score spanquery would be useless :) {quote} So the rewrite methods can only be used for real SpanQueries, how about moving those rewrite methods out of MTQ? I know, then we must make some classes more public... But I was already thinking about the code mess in MTQ. Maybe we should remove those modes and put into separate classes at all. {quote} I agree completely... its tricky to scroll through the massive .java file and find what we want. I would also prefer in this case for the Span-rewrite methods to be in the actual o.a.l.search.span package... > add spanquery support for all multitermqueries > ---------------------------------------------- > > Key: LUCENE-2754 > URL: https://issues.apache.org/jira/browse/LUCENE-2754 > Project: Lucene - Java > Issue Type: New Feature > Components: Search > Reporter: Robert Muir > Fix For: 4.0 > > Attachments: LUCENE-2754.patch > > > I set fix version: 4.0, but possibly we could do this for 3.x too > Currently, we have a special SpanRegexQuery in contrib, and issues like LUCENE-522 open for SpanFuzzyQuery. > The SpanRegexQuery in contrib is a little messy additionally. > For any arbitrary MultiTermQueries to work as a SpanQuery, there are only 3 requirements: > # The un-rewritten query must extend SpanQuery so it can be included in Span clauses > # The rewritten query should be SpanOrQuery instead of BooleanQuery > # The rewritten term clauses should be SpanTermQueries. > Instead of having logic like this for each query, i suggest adding two rewrite methods: > * ScoringSpanBoolean rewrite > * TopTermsSpanBoolean rewrite > as a start i wrote these up, and added a SpanMultiTermQueryWrapper that can be used to wrap any multitermquery this way. > there are a few kinks, but I think the MTQ policeman can probably help get through them. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org