GitHub user laimis opened a pull request:
https://github.com/apache/lucenenet/pull/50
Lucene42 codec fixes
This PR contains fixes for numerous bugs in Lucene42 codec port, especially
around FST functionality.
First commit is all about changing from long to long? for FST instances to
make sure that code branches such as this one
https://github.com/apache/lucenenet/blob/master/src/Lucene.Net.Core/Util/Fst/FST.cs#L465
evaluate properly. With long, Outputs.Merge gets called when it should not
have and then an exception "Specified method is not supported." is thrown.
(here is one example in TC:
http://teamcity.codebetter.com/viewLog.html?buildId=178533&tab=buildResultsDiv&buildTypeId=LuceneNet_Core#testNameId8117509285720903580)
Then once the fix allowed further code execution, noticed that FST and some
other classes related to it use cast to object when comparing generic type
values. Equals should be used as that will work for reference and value types
properly. Next commits take care of that.
This also gets a bunch of TestLucene42DocValuesFormat tests to pass.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/laimis/lucenenet Lucene42_fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/50.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 #50
----
commit 9b7cd19e81ddf8a8271c5652f764d6f4834e0028
Author: Laimonas Simutis <[email protected]>
Date: 2015-01-18T02:01:54Z
change from long to long? in FST to match Lucene logic
commit 580df448724d68db306dcb28c7a113ce7425d672
Author: Laimonas Simutis <[email protected]>
Date: 2015-01-18T02:13:34Z
use Equals instead of cast to object
commit dd5e572f527dbf59167ffcad311fc0326da29dbf
Author: Laimonas Simutis <[email protected]>
Date: 2015-01-18T02:19:22Z
correct Debug.Assert comparisson
commit a83698970db903b2de2a02548b1946934ffc7220
Author: Laimonas Simutis <[email protected]>
Date: 2015-01-18T02:41:46Z
more Equals comparisson fixes
----
---
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.
---