[ 
https://issues.apache.org/jira/browse/LUCENE-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786828#action_12786828
 ] 

Simon Willnauer commented on LUCENE-2123:
-----------------------------------------

Could we make FuzzyRewrite a subclass of BooleanQueryRewriteMethod and add a 
simple check like
{code}
if(!mtq.getRewriteMethod() instanceof BooleanRewrite){
  mtq.setRewriteMethod(BooleanRewriteMethod)
}
{code}

As it rewrites to booleanquery it seems to be ok to subclass though.

Yet another thing, you throw unsupportedOperationException in 
FuzzyQuery#setRewriteMethod, we should at least document in MTQ that this is an 
optional operation. Something like
{code}
/**
  * ... (optional operation)
  * @throws UnsupportedOperationException if this method is not supported by 
the MultiTermQuery
  */
{code}




> Highlighter fails to highlight FuzzyQuery
> -----------------------------------------
>
>                 Key: LUCENE-2123
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2123
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/highlighter
>    Affects Versions: Flex Branch
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: Flex Branch
>
>
> As FuzzyQuery does not allow to change the rewrite mode, highlighter fails 
> with UOE in flex since LUCENE-2110, because it changes the rewrite mode to 
> Boolean query. The fix is: Allow MTQ to change rewrite method and make 
> FUZZY_REWRITE public for that.

-- 
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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to