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

Mark Miller commented on LUCENE-1599:
-------------------------------------

Well yuck.

SpanNearQuery does this clone call in its rewrite method but there is no clone 
impl - so it looks like it returns a SpanNearQuery with the same clauses 
instance. So it looks like this gets tangled up with the real query, and the 
real query gets modified to the rewritten form for the rewrite on searchable2.

I think anyway. I wanted to just test a fix to if that was right, but 
SpanNearQuery can contain any span queries, so I guess all of them might need 
clone impls and we may have to clone the whole chain?

A little tired to think about it at the moment ;) Looks like the issue is with 
the cloning in SpanNearQuery though.

> SpanRegexQuery and SpanNearQuery is not working with MultiSearcher
> ------------------------------------------------------------------
>
>                 Key: LUCENE-1599
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1599
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: contrib/*
>    Affects Versions: 2.4.1
>         Environment: lucene-core 2.4.1, lucene-regex 2.4.1
>            Reporter: Billow Gao
>            Assignee: Mark Miller
>             Fix For: 2.9
>
>         Attachments: TestSpanRegexBug.java
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> MultiSearcher is using:
> queries[i] = searchables[i].rewrite(original);
> to rewrite query and then use combine to combine them.
> But SpanRegexQuery's rewrite is different from others.
> After you call it on the same query, it always return the same rewritten 
> queries.
> As a result, only search on the first IndexSearcher work. All others are 
> using the first IndexSearcher's rewrite queries.
> So many terms are missing and return unexpected result.
> Billow

-- 
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