GitHub user NightOwl888 opened a pull request:
https://github.com/apache/lucenenet/pull/188
Fixed 64 Failing Tests and Finished Facet Implementation
Fixed the 64 failing Facet tests, refactored the public API to be more .NET
friendly (changing methods to properties and vice versa, renaming Size to
Count, MaxSize to Capacity, Close() to Dispose(), etc.), and updated the
documentation comments.
There is just [one
area](https://github.com/NightOwl888/lucenenet/blob/facet-bugz/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs#L70-L80)
that may need attention - the original implementation used a LinkedHashMap as
a cache and switched it out for HashMap when the size grew large. The
LRUHashMap is the closest thing we currently have to LinkedHashMap, but using
it doesn't work. A plain old generic Dictionary works fine, but may use more
RAM than the designers intended.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NightOwl888/lucenenet facet-bugz
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/188.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 #188
commit 104d1f5ec3d9db495ed09a740500516c01594215
Author: Shad Storhaug
Date: 2016-09-23T14:07:16Z
Fixed Facet.Taxonomy.LRUHashMap implementation to correctly remove the
eldest item from the cache when an item is added (test passing).
commit 402f6bb257c816b4e24b845403b6df9916549269
Author: Shad Storhaug
Date: 2016-09-23T15:32:08Z
Fixed bug in Facet.Taxonomy.SearcherTaxonomyManager - wrong exception being
thrown.
commit e7af63ac32ac644764ff741ea3ba92bad2246e1a
Author: Shad Storhaug
Date: 2016-09-23T16:38:42Z
Finished implementation of Facet.Taxonomy.WriterCache.TestCharBlockArray
test and fixed the implementation of CharBlockArray and CompactLabelToOrdinal
to make the test pass.
commit b5b6fde6c5bc72abe1c12001a8bc08a527b9d861
Author: Shad Storhaug
Date: 2016-09-24T09:32:20Z
Finished port of Facet.Taxonomy.WriterCache.TestCompactLabelToOrdinal and
fixed bugs with FacetLabel hash code, CategoryPathUtils.EqualsToSerialized(),
CharBlockArray.SubSequence() and CompactLabelToOrdinal.Open() to make the tests
pass. Added an extra non-random test to make debugging easier.
commit ae64ab768ea23fc7a51551c941de1cd142c205be
Author: Shad Storhaug
Date: 2016-09-24T09:33:54Z
Added reminder to .NETify the Size property.
commit c12cd7c8ab24016f5940f02278fa2f053b234ea6
Author: Shad Storhaug
Date: 2016-09-24T10:32:38Z
Facet.FacetResult & Facet.LabelAndValue: Fixed string format bugs by adding
extra constructors to track the underlying data type of return value and
formatting accordingly in ToString().
commit 67f145fd362e9944b124be336ec032f61b2cd1f6
Author: Shad Storhaug
Date: 2016-09-24T12:19:06Z
Fixed wrong exception thrown from
Facet.SortedSet.SortedSetDocValuesFacetCounts as well as the wrong expected
exception in its test.
commit 469858f36f837923dadd4215e5c443941295532b
Author: Shad Storhaug
Date: 2016-09-24T13:09:24Z
Fixed sorting bugs in Facet.FacetTestCase. Need to sort the list that was
passed into the method, not create a new one.
commit d818454594cee8f0ae0809354fa4db960602abba
Author: Shad Storhaug
Date: 2016-09-24T13:30:05Z
Fixed Facet.FacetTestCase.SortTies() to include a sort length rather than
end index.
commit 5be3d7f4de5744113d781e6f24ce252c0efb6fde
Author: Shad Storhaug
Date: 2016-09-24T15:42:56Z
Fixed bug in Facet.Taxonomy.TestTaxonomyFacetCounts.TestBasic() where the
output wasn't being written to because of a missing StreamWriter.
commit 4e3adf7409c9746766ba149edbd8319c2c2366c2
Author: Shad Storhaug
Date: 2016-09-24T16:52:23Z
Fixed assert bug in Facet.TestDrillSideways.VerifyEquals() that caused
random failures.
commit 1cd74755a09b7d3fe1bbb668638191ad6d7d6a5c
Author: Shad Storhaug
Date: 2016-09-24T16:53:20Z
Fixed cache cleanup bug in Facet.Taxonomy.WriterCache.NameIntCacheLRU.
commit 5e4bc71f12dc52cc8784ca328b2b880f2c583327
Author: Shad Storhaug
Date: 2016-09-24T18:14:36Z
Facet: Normalized code formatting, license headers, and usings.
commit 3e09d0e0d9cb6c48712193c60a96bc7524a42c5a
Author: Shad Storhaug
Date: 2016-09-24T18:20:50Z
.NETify Facet: Interfaces should begin with an "I"
commit 7084f2656dac53a05db93d796e8ffa3671ad1cf5
Author: Shad Storhaug
Date: 2016-09-25T07:50:19Z
.NETify Facet: Method names should be