GitHub user laimis opened a pull request:
https://github.com/apache/lucenenet/pull/128
Enumerable fixes and ReverseByteReader fix
Two fixes in this commit as the both are needed to fix the bug discovered
in the failing BaseDocValuesFormatTestCase.TestVeryLargeButLegalSortedBytes
when run with Lucene42DocValuesFormat.
First commit replaces all the enumerables that reused the same instance
variable to return enumeration values.
Second commit fixes a bug with reverse byte reader anonymous class to match
Lucene's version:
https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java#L419
Note how a private byte[] current pointer is used to keep track of the
current byte block that the iterator is traveling through. In Lucene.Net port
the private array was left unused and instead the higher level "current" was
modified which is used and modified by other iterators at the same time.
It only affected Lucene42 because it uses FST to store the sorted doc
values. Also it affected only the large bytes test because it needs a value
large enough where multiple byte blocks come into play and that's where
"current block" mistakenly was pointed to a wrong one.
The assert console output has gone away and the
TestVeryLargeButLegalSortedBytes test passes. I am seeing those assert
"frozenHash vs h" messages in other Lucene42 tests, investigating right now.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/laimis/lucenenet enumerable_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/128.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #128
----
commit b61e2b904f70c2328b7fb1d6d051261f3e90cad3
Author: Laimonas Simutis <[email protected]>
Date: 2015-04-16T00:58:43Z
make sure to init new instance of bytresref when enumerating
commit 8b9ae9cbb7d77e04924d4df260ce09372f47e3e6
Author: Laimonas Simutis <[email protected]>
Date: 2015-04-16T00:59:34Z
fix reverse byte reader
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---