You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by NightOwl888 <gi...@git.apache.org> on 2016/09/19 10:42:00 UTC
[GitHub] lucenenet pull request #186: Ported Misc (mostly), Suggest, and Memory
GitHub user NightOwl888 opened a pull request:
https://github.com/apache/lucenenet/pull/186
Ported Misc (mostly), Suggest, and Memory
This pull request contains Lucene.Net.Misc, Lucene.Net.Suggest, and Lucene.Net.Memory. There is also some cleanup of the compiler warnings in Analysis/QueryParser as well as renaming the QueryParser namespace to QueryParsers to avoid naming collisions with classes named QueryParser (similar to the Document namespace being Documents).
Note that this pull request contains the commits from #185 (which has already been reviewed), so you should pull that one first so you don't have to review the same thing twice.
Current Status
==========
Misc
---
40 tests passing/42
#### 2 Failing Tests
1. Misc.Document.TestLazy() - The document is returning exactly (values * fields). The test [expects (values * fields) + 1](https://github.com/apache/lucene-solr/blob/8fdf89690404c0e65784b2c5477552b9dec58591/lucene/misc/src/test/org/apache/lucene/document/TestLazyDocument.java#L122). Without knowing what the +1 is supposed to represent, this is a wild goose chase. Any ideas?
2. Misc.Index.Sorter.TestEarlyTerminationDifferentSorter() - This test fails before it gets to the class under test due to a bug somewhere in the core. It fails about 15-20% of the time, but since the test is setup to run at least 5 times, the test fails about 90% of the time. I am unable to make it fail with manual input, so it is hard to figure out which random iteration will fail. The cause is a null reference exception due to the priority Queue being all nulls (its initial state). The UpdateBottom() method sets the Bottom member variable to null, and then the [code tries to access Bottom.Slot](https://github.com/NightOwl888/lucenenet/blob/misc-suggest/src/Lucene.Net.Core/Search/TopFieldCollector.cs#L397-L398). So, apparently some call is missing to update the priority queue and/or something is misbehaving and clearing it out. If I catch the exception, or put a null check before accessing the value (defaulting to 0), then the test passes. It seems like that null safety check s
hould be there - or was the null check left out intentionally in Java to make it blow up when the PQ is empty?
#### Not Yet Ported
The Misc.Store directory. There is some C++ code in there for native Windows, Unix and Posix directories. I am not sure it makes any sense to port it.
Suggest
----
140 tests passing/141
#### 1 Failing Test
1. Suggest.Analyzing.AnalyzingSuggesterTest.TestRandom() - The random test fails when the [numQueries variable](https://github.com/NightOwl888/lucenenet/blob/misc-suggest/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs#L785) is greater than 1 and passes when it is set to 1. It appears that the all of the input passes all the way through without being filtered. However, it is unclear if the problem is [here](https://github.com/NightOwl888/lucenenet/blob/misc-suggest/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs#L785) or in FST. Unfortunately, the same number of records always comes out of that function that go in, but it is not clear whether that is what is supposed to happen and the filtering is done elsewhere, or if that is the part that is failing. It would be helpful to know what piece is supposed to filter the results.
Memory
----
10 tests passing/10
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NightOwl888/lucenenet misc-suggest
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/186.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 #186
----
commit c67366fd4b383c31971a8ae68b458dec7aee2d7f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-05T14:25:35Z
Setup InternalsVisibleTo Lucene.Net.Core <- Lucene.Net.Tests for testing.
commit b56ebc22bb06fddc941b467d8310cfd735e5f9e9
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-06T06:17:13Z
Setup InternalsVisibleTo Lucene.Net.TestFramework <- Lucene.Net.Tests for testing.
commit 243ada716c47dafeaf8d2aa39c9ebd8f4c0e8bd7
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-05T11:21:23Z
Fixed bugs in FST that were causing test failures and Debug.Assert failures in Misc.Util.Fst.
commit 9a562204f973b8380ead3ed89fc3ee527fa904a9
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-05T12:21:45Z
Ported Core.Util.Fst.TestBytesStore
commit 297f92653a0e8e64c25b171444ca18f0387f190a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-06T07:18:19Z
.NETify FST: Public member names should be PascalCase.
commit 3da18fb7d9101d42fedc5932fb22afc7254c52a4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-06T11:55:43Z
Ported Core.Util.Fst.TestFSTs
commit 5effb005955f357825cb9447f186b221a8d63cb7
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-06T19:01:26Z
Ported Core.Util.Packed.TestPackedInts
commit 510413ce4b99d15a79a70d876e5f89ca657dc193
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T09:18:17Z
.NETify FST: Changed Final, Last, Compiled, and Reversed() to IsFinal, IsLast, IsCompiled, and IsReversed to make it clear that they are boolean states.
commit dfa23109cbe204fa9339e7d4ab23f854c18b46c9
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T09:49:13Z
Removed duplicate (hidden) class definitions in FST.
commit b8db797ba917041dabe034e3ddf5960dd14fc04a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T10:28:33Z
.NETify FST: Private/protected fields should be camelCase.
commit 18f84437970c1cc0d16312952a4e6726d35f97df
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T10:30:10Z
.NETify FST: Interfaces should start with "I"
commit 3994051b243f9e4a39cdda107ac8c6d1d68a78e2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T11:07:43Z
Moved BytesRefFSTEnum<T>.InputOutput<T> and IntsRefFSTEnum<T>.InputOutput<T> classes into non-generic classes with the same name so we don't need to specify the generic type twice.
commit 0ccb5b65809ad6b341b3b04fcdfb43c58e53aff5
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T11:17:58Z
Normalized FST license headers
commit 01e903b1022cf13d708d8c1b5502047ebf704459
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T20:11:08Z
Refactored FST class to disallow the verbose and confusing FST<T>.Arc<T> syntax, favoring FST.Arc<T>.
commit 8617aa9997568d9fc72743f68784b60f9d2ddbd2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T17:06:47Z
Fixed infinite recursion issue and key not found bugs in the FSTTester
commit d807eeba7a8cdbb3efc54a00e12312ea0f11b308
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T17:46:08Z
Core.Util.Fst.TestFSTs: Fixed infinite recursion bug in TestRealTerms(). Use Environment.TickCount rather than DateTime.Now.Millisecond when doing time sensitive testing.
commit 32e2105bba349544c3166d30f664ef7edd219a3a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T19:19:29Z
TestFSTs: Added LongRunningTest and Ignore attributes for applicable tests.
commit ef889cebdeaa180d0bb232afd8e5ab3865cd41bc
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-07T22:23:58Z
Fixed issue with SortedSet not being emptied in Core.Util.Fst.Util, and added thread safety, since SortedSet doesn't have the necessary atomic operations.
commit b1203e6b4cb9551fe09999114890e74e77cb6937
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T10:53:32Z
Ported StressRamUsageEstimator & TestRamUsageEstimator + fixed bugs in RamUsageEstimator
commit 878080dcd9d7aa5d705e8fce6d3d6cdad20dfeff
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T10:55:00Z
Added timeout to long running test (~45 sec) in Core.Util.Packed.TestPackedInts
commit 0c2f5ae9a89eb29ce35835773e308235a5a91579
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T17:02:22Z
Ported Core.Util.TestIdentityHashSet + fixed bugs in RamUsageEstimator.IdentityHashSet.
commit 3b18a74a95c21ee4174fcd87c16bea5fe05d6752
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T19:22:30Z
Ported Core.Util.TestWeakIdentityMap (partially)
commit e659c99328f5cfd7089166ec6ed30fd98294905e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T19:23:03Z
Fixed String.Format bug in Core.Util.NamedThreadFactory
commit e9e4425adbf39d70153c4888929820b4468d8dda
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T19:43:25Z
Ported Core.TestDemo
commit 2c3dbc639d30c39807ffdcbf0edc1689bd64b19f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T20:09:02Z
Ported Core.TestSearch
commit 0e77936c82232bbcea94dcc1f59e98fc7961fa6a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T20:19:31Z
Ported Core.TestSearchForDuplicates
commit f4819a3e4902fd7c257f70068e511145cbc031e4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T20:59:31Z
Ported Core.TestExternalCodes + fixed bugs that were preventing it from running.
commit 4b4485bee1984f66c871418fc7266453c96e1095
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T21:08:30Z
Moved tests from namespace Lucene.Net.Document to Lucene.Net.Documents so we don't have conflicts with the Document type and cleaned up headers.
commit c031b600cf3fe1bb44754a65384d20008dcdfc90
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T21:17:21Z
Ported Core.TestMergeSchedulerExternal
commit 202c06875743cdec1ba2d8903ee3337479f65354
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date: 2016-09-10T22:28:54Z
Finished implementing ignored Classification.SimpleNaiveBayesClassifierTest.TestNGramUsage()
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet pull request #186: Ported Misc (mostly), Suggest, and Memory
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/lucenenet/pull/186
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet issue #186: Ported Misc (mostly), Suggest, and Memory
Posted by NightOwl888 <gi...@git.apache.org>.
Github user NightOwl888 commented on the issue:
https://github.com/apache/lucenenet/pull/186
The projects were "ported", but they were not compiling and were not part of the solution. The fix for FST was to get the bugs out of it because both Misc and Suggest depend on it. Although Suggest only depends on 3 types in Misc, I ported nearly all of it.
The work done here was to finish up the unfinished implementation of Suggest, and to get its tests to pass (no easy feat, mind you).
Anyway, give me a few minutes to fix the merge conflict.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet issue #186: Ported Misc (mostly), Suggest, and Memory
Posted by synhershko <gi...@git.apache.org>.
Github user synhershko commented on the issue:
https://github.com/apache/lucenenet/pull/186
All 3 were already ported - can you please elaborate on the work done here?
Also some conflicts due to recent merges...
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet issue #186: Ported Misc (mostly), Suggest, and Memory
Posted by NightOwl888 <gi...@git.apache.org>.
Github user NightOwl888 commented on the issue:
https://github.com/apache/lucenenet/pull/186
Okay, this one has rebased successfully without any issues.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---