You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/11/11 14:46:14 UTC

[jira] Updated: (LUCENE-2754) add spanquery support for all multitermqueries

     [ https://issues.apache.org/jira/browse/LUCENE-2754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2754:
--------------------------------

    Attachment: LUCENE-2754.patch

here's an initial patch... all the SpanRegexQuery tests pass, but it could use its own tests too.

theres a nocommit mentioning what i don't like.


> 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