You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Erik Hatcher <er...@ehatchersolutions.com> on 2005/07/22 21:18:33 UTC

Re: DO NOT REPLY [Bug 34154] - Further improvements to BooleanScorer2

Paul,

I don't have a test case handy (yet), but we're still seeing the  
exception even after applying the patch from #35823.  Do I need to  
apply some of the code from 34154 as well?

Thanks,
     Erik


On Jul 22, 2005, at 2:31 PM, bugzilla@apache.org wrote:

> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://issues.apache.org/bugzilla/show_bug.cgi?id=34154>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
> INSERTED IN THE BUG DATABASE.
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=34154
>
>
> paul.elschot@xs4all.nl changed:
>
>            What    |Removed                     |Added
> ---------------------------------------------------------------------- 
> ------
>   BugsThisDependsOn|                            |32823
>
>
>
>
> ------- Additional Comments From paul.elschot@xs4all.nl  2005-07-22  
> 20:31 -------
> BooleanScorer2Coord.java will need the functionality of the patch  
> of bug 32823.
>
> -- 
> Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi? 
> tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>


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


Re: DO NOT REPLY [Bug 34154] - Further improvements to BooleanScorer2

Posted by Paul Elschot <pa...@xs4all.nl>.
On Tuesday 26 July 2005 03:01, Erik Hatcher wrote:
> 
...
> 
> Let me know if there is other information I can provide, or other  
> variants of BooleanScorer2 I can try.

In case this is cricital you can use this to revert to the 1.4 version of 
BooleanScorer:
BooleanQuery.setUseScorer14(true)

Regards,
Paul Elschot


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


Re: DO NOT REPLY [Bug 34154] - Further improvements to BooleanScorer2

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 26, 2005, at 3:04 AM, Paul Elschot wrote:
>> +(spanNear([FULLTEXT:cat, FULLTEXT:dog, FULLTEXT:bird], 1, true)
>> spanNear([FULLTEXT:horse, FULLTEXT:cow, FULLTEXT:pig], 1, true)
>> spanNear([FULLTEXT:snake, FULLTEXT:camel], 0, true)) +(FULLTEXT:zebra
>> FULLTEXT:insect spanNear([FULLTEXT:feline, FULLTEXT:goat], 0, true))
>>
>
> Reformatted to show the structure:
> +(spanNear([FULLTEXT:cat, FULLTEXT:dog, FULLTEXT:bird], 1, true)
>   spanNear([FULLTEXT:horse, FULLTEXT:cow, FULLTEXT:pig], 1, true)
>   spanNear([FULLTEXT:snake, FULLTEXT:camel], 0, true)
> )
> +(FULLTEXT:zebra
>   FULLTEXT:insect
>   spanNear([FULLTEXT:feline, FULLTEXT:goat], 0, true)
> )
>
> The top level ConjunctionScorer nicely shows up in the traceback.
>
>
>>
>> Quite a sophisticated query mixing BooleanQuery and SpanNearQuery
>> clauses.
>>
>> Let me know if there is other information I can provide, or other
>> variants of BooleanScorer2 I can try.
>>
>> Thanks,
>>      Erik
>>
>> java.lang.ArrayIndexOutOfBoundsException: More matchers (4) than non
>> prohibited scorers (3).
>>
>
> The DisjunctionSumScorer for one of the two 3 way queries is adding
> too many matchers.
>
>
>> Added 4 for doc nr 4930.
>> 0 required scorers.
>> 3 optional scorers.
>> 0 prohibited scorers.
>>
>
> This is consistent with the query.
> Could you keep this index around for later tests?

Absolutely.  I've got it ready to test anytime.

     Erik


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


Re: DO NOT REPLY [Bug 34154] - Further improvements to BooleanScorer2

Posted by Paul Elschot <pa...@xs4all.nl>.
On Tuesday 26 July 2005 03:01, Erik Hatcher wrote:
> 
> On Jul 24, 2005, at 11:23 AM, Paul Elschot wrote:
> 
> > On Friday 22 July 2005 21:18, Erik Hatcher wrote:
> >
> >> Paul,
> >>
> >> I don't have a test case handy (yet), but we're still seeing the
> >> exception even after applying the patch from #35823.  Do I need to
> >>
> >
> > I'm sorry to hear that. However, the patch from bug 35823 allows
> > using of score() more than once on the same document number,
> > so I think it is worthwhile to have anyway.
> > A test case showing the exception would off course be wellcome.
> 
> Paul - I just updated to your BooleanScorer2 and got the output shown  
> below.  I don't have a test case that I can provide, as the data is  
> private for the case that causes this error.  The search is something  
> like (I changed the words because that information is also private,  
> sorry):

The words should have no influence on this.
 
> +(spanNear([FULLTEXT:cat, FULLTEXT:dog, FULLTEXT:bird], 1, true)  
> spanNear([FULLTEXT:horse, FULLTEXT:cow, FULLTEXT:pig], 1, true)  
> spanNear([FULLTEXT:snake, FULLTEXT:camel], 0, true)) +(FULLTEXT:zebra  
> FULLTEXT:insect spanNear([FULLTEXT:feline, FULLTEXT:goat], 0, true))

Reformatted to show the structure:
+(spanNear([FULLTEXT:cat, FULLTEXT:dog, FULLTEXT:bird], 1, true)  
  spanNear([FULLTEXT:horse, FULLTEXT:cow, FULLTEXT:pig], 1, true)  
  spanNear([FULLTEXT:snake, FULLTEXT:camel], 0, true)
)
+(FULLTEXT:zebra
  FULLTEXT:insect
  spanNear([FULLTEXT:feline, FULLTEXT:goat], 0, true)
)

The top level ConjunctionScorer nicely shows up in the traceback.

> 
> Quite a sophisticated query mixing BooleanQuery and SpanNearQuery  
> clauses.
> 
> Let me know if there is other information I can provide, or other  
> variants of BooleanScorer2 I can try.
> 
> Thanks,
>      Erik
> 
> java.lang.ArrayIndexOutOfBoundsException: More matchers (4) than non  
> prohibited scorers (3).

The DisjunctionSumScorer for one of the two 3 way queries is adding
too many matchers.

> Added 4 for doc nr 4930.
> 0 required scorers.
> 3 optional scorers.
> 0 prohibited scorers.

This is consistent with the query.
Could you keep this index around for later tests?

>      at org.apache.lucene.search.BooleanScorer2 
> $Coordinator.addDocMatchers(BooleanScorer2.java:57)
>      at org.apache.lucene.search.BooleanScorer2$1.score 
> (BooleanScorer2.java:157)
>      at org.apache.lucene.search.BooleanScorer2.score 
> (BooleanScorer2.java:329)
>      at org.apache.lucene.search.ConjunctionScorer.score 
> (ConjunctionScorer.java:82)
>      at org.apache.lucene.search.BooleanScorer2$2.score 
> (BooleanScorer2.java:182)
>      at org.apache.lucene.search.BooleanScorer2.score 
> (BooleanScorer2.java:329)
>      at org.apache.lucene.search.BooleanScorer2.score 
> (BooleanScorer2.java:289)
>      at org.apache.lucene.search.IndexSearcher.search 
> (IndexSearcher.java:102)
>      at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:65)
>      at org.apache.lucene.search.Hits.<init>(Hits.java:44)
>      at org.apache.lucene.search.Searcher.search(Searcher.java:40)
>      at org.apache.lucene.search.Searcher.search(Searcher.java:32)
> 

Thanks a lot. I'll check the use of DisjunctionSumScorer in BooleanScorer2 later.

Regards,
Paul Elschot


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


Re: DO NOT REPLY [Bug 34154] - Further improvements to BooleanScorer2

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 24, 2005, at 11:23 AM, Paul Elschot wrote:

> On Friday 22 July 2005 21:18, Erik Hatcher wrote:
>
>> Paul,
>>
>> I don't have a test case handy (yet), but we're still seeing the
>> exception even after applying the patch from #35823.  Do I need to
>>
>
> I'm sorry to hear that. However, the patch from bug 35823 allows
> using of score() more than once on the same document number,
> so I think it is worthwhile to have anyway.
> A test case showing the exception would off course be wellcome.

Paul - I just updated to your BooleanScorer2 and got the output shown  
below.  I don't have a test case that I can provide, as the data is  
private for the case that causes this error.  The search is something  
like (I changed the words because that information is also private,  
sorry):

+(spanNear([FULLTEXT:cat, FULLTEXT:dog, FULLTEXT:bird], 1, true)  
spanNear([FULLTEXT:horse, FULLTEXT:cow, FULLTEXT:pig], 1, true)  
spanNear([FULLTEXT:snake, FULLTEXT:camel], 0, true)) +(FULLTEXT:zebra  
FULLTEXT:insect spanNear([FULLTEXT:feline, FULLTEXT:goat], 0, true))

Quite a sophisticated query mixing BooleanQuery and SpanNearQuery  
clauses.

Let me know if there is other information I can provide, or other  
variants of BooleanScorer2 I can try.

Thanks,
     Erik

java.lang.ArrayIndexOutOfBoundsException: More matchers (4) than non  
prohibited scorers (3).
Added 4 for doc nr 4930.
0 required scorers.
3 optional scorers.
0 prohibited scorers.
     at org.apache.lucene.search.BooleanScorer2 
$Coordinator.addDocMatchers(BooleanScorer2.java:57)
     at org.apache.lucene.search.BooleanScorer2$1.score 
(BooleanScorer2.java:157)
     at org.apache.lucene.search.BooleanScorer2.score 
(BooleanScorer2.java:329)
     at org.apache.lucene.search.ConjunctionScorer.score 
(ConjunctionScorer.java:82)
     at org.apache.lucene.search.BooleanScorer2$2.score 
(BooleanScorer2.java:182)
     at org.apache.lucene.search.BooleanScorer2.score 
(BooleanScorer2.java:329)
     at org.apache.lucene.search.BooleanScorer2.score 
(BooleanScorer2.java:289)
     at org.apache.lucene.search.IndexSearcher.search 
(IndexSearcher.java:102)
     at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:65)
     at org.apache.lucene.search.Hits.<init>(Hits.java:44)
     at org.apache.lucene.search.Searcher.search(Searcher.java:40)
     at org.apache.lucene.search.Searcher.search(Searcher.java:32)



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


Re: DO NOT REPLY [Bug 34154] - Further improvements to BooleanScorer2

Posted by Paul Elschot <pa...@xs4all.nl>.
On Friday 22 July 2005 21:18, Erik Hatcher wrote:
> Paul,
> 
> I don't have a test case handy (yet), but we're still seeing the  
> exception even after applying the patch from #35823.  Do I need to  

I'm sorry to hear that. However, the patch from bug 35823 allows
using of score() more than once on the same document number,
so I think it is worthwhile to have anyway.
A test case showing the exception would off course be wellcome.

> apply some of the code from 34154 as well?

#34154 splits the boolean scorer into one without coordination
and one with coordination, mostly for performance. 
This is (or at least should be) independent of the bug
in the current trunk that causes the array index out of bounds.
It's best to fix the bug in the current trunk first, and then #34154
might be reconsidered.

Regards,
Paul Elschot


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