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 <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
Date:   2016-09-23T15:32:08Z

    Fixed bug in Facet.Taxonomy.SearcherTaxonomyManager - wrong exception being 
thrown.

commit e7af63ac32ac644764ff741ea3ba92bad2246e1a
Author: Shad Storhaug <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
Date:   2016-09-24T09:33:54Z

    Added reminder to .NETify the Size property.

commit c12cd7c8ab24016f5940f02278fa2f053b234ea6
Author: Shad Storhaug <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
Date:   2016-09-24T13:30:05Z

    Fixed Facet.FacetTestCase.SortTies() to include a sort length rather than 
end index.

commit 5be3d7f4de5744113d781e6f24ce252c0efb6fde
Author: Shad Storhaug <s...@shadstorhaug.com>
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 <s...@shadstorhaug.com>
Date:   2016-09-24T16:52:23Z

    Fixed assert bug in Facet.TestDrillSideways.VerifyEquals() that caused 
random failures.

commit 1cd74755a09b7d3fe1bbb668638191ad6d7d6a5c
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-24T16:53:20Z

    Fixed cache cleanup bug in Facet.Taxonomy.WriterCache.NameIntCacheLRU.

commit 5e4bc71f12dc52cc8784ca328b2b880f2c583327
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-24T18:14:36Z

    Facet: Normalized code formatting, license headers, and usings.

commit 3e09d0e0d9cb6c48712193c60a96bc7524a42c5a
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-24T18:20:50Z

    .NETify Facet: Interfaces should begin with an "I"

commit 7084f2656dac53a05db93d796e8ffa3671ad1cf5
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T07:50:19Z

    .NETify Facet: Method names should be PascalCase

commit bfda3628103e2301c31496b368b24474138e6548
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T03:33:03Z

    .NETify Facet: Field names should be camelCase. Fields should not be public 
(changed to properties with PascalCase names).

commit fb7f9ed0e23ee6e9e8a05140136927f39224fb47
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T03:43:36Z

    .NETify Facet: Renamed method from entryIterator() to GetEnumerator()

commit 71874be7a26c93f517e84a7640399fcf947e4e6c
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T05:06:55Z

    Fixed bug in 
Facet.Taxonomy.Directory.DirectoryTaxonomyWriter.MemoryOrdinalMap - setting 
size has no effect on the size of the array.

commit 283a1e902f571b19e96cea32fc7e9b38e90b368d
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T06:22:53Z

    Fixed Facet.Taxonomy.Directory.TaxonomyIndexArrays _renamed variable names.

commit 7b2a3df0df8ce8787a03edfc9450c219dc2409cf
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T07:17:24Z

    Fixed string CompareTo to match Java

commit b0a4769bc256b6626b5a82ef01ac4ffe570a8ad3
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T07:40:30Z

    Facet: Changed accessibility of class members to match Java Lucene.

commit fdbac95a6be2ce3c38db1196b72fb19513800dfd
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:10:27Z

    Facets: Return List<T> rather than IList<T> to prevent having to do too 
many O(n) operations on the results.

commit cbf28e95e1d2f91dbc75e57916c867fec3377830
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:18:47Z

    Facet.Taxononmy.Directory.DirectoryTaxonomyWriter.IOrdinalMap: Renamed Size 
back to the original SetSize() because it changes the internal state of the 
object.

commit b9161fba87e9050f19510e847f5fe221524a466f
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:31:19Z

    Changed Facet.Taxonomy.ParallelTaxonomyArrays methods Parents, Children, 
and Siblings to be properties.

commit e80027acf3dc78539712d0431bea42844c235b13
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:34:14Z

    Renamed Facet.Taxononmy.WriterCache.ITaxonomyWriterCache.Full back to its 
original name IsFull to indicate it is a boolean state.

commit 6cf0c7ea6e35985b6f384ff9843860575f42d9d9
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:40:35Z

    Renamed Facet.Taxonomy.WriterCache.CompactLabelToOrdinal.MemoryUsage, 
Cl2oTaxonomyWriterCache.MemoryUsage and CollisionMap.MemoryUsage back to their 
original name (GetMemoryUsage()) because these are intensive operations.

commit e8b8a411f139bd1de16e55651e77586eb0c593b5
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:46:15Z

    Changed Size() and Capacity() methods of 
Facet.Taxonomy.WriterCache.CollisionMap to Count and Capacity properties.

commit f2b646c4b84bfbe885b6db7811152c5342c7ac2c
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:47:36Z

    Changed Facet.Taxonomy.WriterCache.CompactLabelsToOrdinal.SizeOfMap to a 
property

commit 56d924a6d8f194ee10d974dfb068af370e391930
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T08:50:46Z

    Changed Facet.Taxonomy.WriterCache.LabelToOrdinal.NextOrdinal back to a 
method (GetNextOrdinal()) because it is not deterministic.

commit 866b8455b3fd91836b2972e21d53ea3deda4d39b
Author: Shad Storhaug <s...@shadstorhaug.com>
Date:   2016-09-25T09:07:13Z

    Changed Facet.FacetsCollector.GetMatchingDocs back to a method 
(non-deterministic), modified it to return a List<T> instead of IList<T> and 
modified related members OriginalMatchingDocs and CreateSampledDocs() similarly.

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to