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

Robert Muir updated LUCENE-3238:
--------------------------------

    Attachment: LUCENE-3238.patch

Same patch: except I made MultiTermQuery's rewrite() final.

In my opinion, this is a good backwards break, it will only fix bugs in 
someone's code if they have a custom MultiTermQuery: its very tricky to 
override this (e.g. you must pass along boost, rewriteMethod, ...), and when 
you do, still might cause problems (like this Span issue).

Its also much easier to just return a simpler enum.


> SpanMultiTermQueryWrapper with Prefix Query issue
> -------------------------------------------------
>
>                 Key: LUCENE-3238
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3238
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 3.3
>         Environment: Windows 7, JDK 1.6
>            Reporter: ludovic Boutros
>            Assignee: Robert Muir
>         Attachments: LUCENE-3238.patch, LUCENE-3238.patch, LUCENE-3238.patch
>
>
> If we try to do a search with SpanQuery and a PrefixQuery this message is 
> returned:
> "You can only use SpanMultiTermQueryWrapper with a suitable 
> SpanRewriteMethod."
> The problem is in the WildcardQuery rewrite function.
> If the wildcard query is a prefix, a new prefix query is created, the rewrite 
> method is set with the SpanRewriteMethod and the prefix query is returned.
> But, that's the rewritten prefix query which should be returned:
> -      return rewritten;
> +      return rewritten.rewrite(reader);
> I will attach a patch with a unit test included.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to