Michael,
Thanks for the info. I'll consider it if I get around to trying to
find a
replacement. I haven't seen this issue yet in other BitArray uses yet, but
I'm sure they are out there. I'm looking at other bugs for now, as I want to
get this over to .NET 3.5 ASAP.
- Nick
-----Original Message-----
From: Michael Garski [mailto:[email protected]]
Sent: Monday, November 23, 2009 12:46 PM
To: [email protected]
Subject: RE: [jira] Updated: (LUCENENET-301) Tests on TestTimeLimitedCollector
fail
Nick,
We no longer use the BitArray-backed filters in favor of the OpenBitSet, whose
capacity can be expanded on demand and performs better. The Bits() method on
filters is deprecated in 2.9.
A simple wrapper around BitArray to allow it to grow would probably be enough
to ensure there is a similar class for unit tests and DocIdBitSet and users
should be pointed in the direction of OpenBitSet instead.
Michael
-----Original Message-----
From: Nicholas Paldino (JIRA) [mailto:[email protected]]
Sent: Monday, November 23, 2009 1:45 AM
To: [email protected]
Subject: [jira] Updated: (LUCENENET-301) Tests on TestTimeLimitedCollector
fail
[
https://issues.apache.org/jira/browse/LUCENENET-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicholas Paldino updated LUCENENET-301:
---------------------------------------
Attachment: TestTimeLimitedCollector.patch
The MyHitCollector class uses a BitArray with a length of 64. However,
documents with an id of over 63 are used as indexes to set the bit in the
BitArray, which causes an exception.
In Java, the BitSet class would be used, and the set would grow automatically
to accomidate the new bits.
I fixed the test to simply increase the length of the bit array to make sure
it has the capacity before setting the bit using the document id.
Now all the tests mentioned in the original issue statement pass.
It should be noted that a class which emulates the BitSet to use as a
replacement for BitArray would be preferable at some point to encapsulate the
growth.
> Tests on TestTimeLimitedCollector fail
> --------------------------------------
>
> Key: LUCENENET-301
> URL: https://issues.apache.org/jira/browse/LUCENENET-301
> Project: Lucene.Net
> Issue Type: Bug
> Reporter: Nicholas Paldino
> Attachments: TestTimeLimitedCollector.patch
>
>
> The tests on TestTimeLimitedCollector fail:
> - TestSearch
> - TestSearchMultiThreaded
> - TestTimeoutGreedy
> - TestTimeoutMultiThreaded
> - TestTimeoutNotGreedy
> Patch to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
smime.p7s
Description: S/MIME cryptographic signature
