You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/08/21 06:54:40 UTC
[01/18] lucenenet git commit: Removed test attribute from
Queries.BooleanFilterTest.TstFilterCard() and
Facet.Taxonomy.Directory.TestDirectoryTaxonomyWriter.TouchTaxo(),
which are clearly not tests.
Repository: lucenenet
Updated Branches:
refs/heads/master 80c9e8c95 -> bb59767c6
Removed test attribute from Queries.BooleanFilterTest.TstFilterCard() and Facet.Taxonomy.Directory.TestDirectoryTaxonomyWriter.TouchTaxo(), which are clearly not tests.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/828819df
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/828819df
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/828819df
Branch: refs/heads/master
Commit: 828819dfa674cbd90a7c6422ac8ec12b20e1dd06
Parents: 80c9e8c
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 07:05:14 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 07:05:14 2016 +0700
----------------------------------------------------------------------
.../Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs | 1 -
src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs | 1 -
2 files changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/828819df/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
index 24b10f7..60e90c2 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyWriter.cs
@@ -193,7 +193,6 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
dir.Dispose();
}
- [Test]
private void TouchTaxo(DirectoryTaxonomyWriter taxoWriter, FacetLabel cp)
{
taxoWriter.AddCategory(cp);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/828819df/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs b/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs
index 3b5e22a..9d37765 100644
--- a/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs
+++ b/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs
@@ -139,7 +139,6 @@ namespace Lucene.Net.Tests.Queries
}
}
- [Test]
private void TstFilterCard(string mes, int expected, Filter filt)
{
DocIdSet docIdSet = filt.GetDocIdSet(reader.AtomicContext, reader.LiveDocs);
[11/18] lucenenet git commit: Fixed "key not found" bug in
Join.TestJoinUtil
Posted by sy...@apache.org.
Fixed "key not found" bug in Join.TestJoinUtil
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/0f9f0ce9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/0f9f0ce9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/0f9f0ce9
Branch: refs/heads/master
Commit: 0f9f0ce995c92b109a1b73558a7043e1d07a1d5c
Parents: 11cf1b8
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 10:05:25 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 10:05:25 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Tests.Join/TestJoinUtil.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f9f0ce9/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
index a254997..1d2da10 100644
--- a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
+++ b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
@@ -1073,7 +1073,7 @@ namespace Lucene.Net.Tests.Join
{
foreach (string linkValue in matchingDoc.LinkValues)
{
- IList<RandomDoc> otherMatchingDocs = linkValueDocuments[linkValue];
+ IList<RandomDoc> otherMatchingDocs = linkValueDocuments.ContainsKey(linkValue) ? linkValueDocuments[linkValue] : null;
if (otherMatchingDocs == null)
{
continue;
[10/18] lucenenet git commit: Fixed missing Reset() call that caused
Queries.Function.ValueSources.TFValueSource.TestTF() to fail.
Posted by sy...@apache.org.
Fixed missing Reset() call that caused Queries.Function.ValueSources.TFValueSource.TestTF() to fail.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/11cf1b87
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/11cf1b87
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/11cf1b87
Branch: refs/heads/master
Commit: 11cf1b8789c3cb30d8ad0316a4859a875c2fdac0
Parents: 1727c1b
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 09:57:05 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 09:57:05 2016 +0700
----------------------------------------------------------------------
.../Function/ValueSources/TFValueSource.cs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/11cf1b87/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
index 4e8efb0..aff074b 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TFValueSource.cs
@@ -81,19 +81,13 @@ namespace Lucene.Net.Queries.Function.ValueSources
this.terms = terms;
this.similarity = similarity;
lastDocRequested = -1;
+ Reset();
}
private DocsEnum docs;
private int atDoc;
private int lastDocRequested;
- //JAVA TO C# CONVERTER TODO TASK: Initialization blocks declared within anonymous inner classes are not converted:
- // {
- // reset();
- // }
-
- //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
- //ORIGINAL LINE: public void reset() throws java.io.IOException
public virtual void Reset()
{
// no one should call us for deleted docs?
[08/18] lucenenet git commit: Added reminder to change
AcceptsDocsOutOfOrder to a property.
Posted by sy...@apache.org.
Added reminder to change AcceptsDocsOutOfOrder to a property.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/694676c9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/694676c9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/694676c9
Branch: refs/heads/master
Commit: 694676c9de8d0cabe0818d38a806cbd80566ac65
Parents: 8b210c0
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 08:05:33 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 08:05:33 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Core/Search/Collector.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/694676c9/src/Lucene.Net.Core/Search/Collector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Collector.cs b/src/Lucene.Net.Core/Search/Collector.cs
index b98d05d..57deb0b 100644
--- a/src/Lucene.Net.Core/Search/Collector.cs
+++ b/src/Lucene.Net.Core/Search/Collector.cs
@@ -170,6 +170,6 @@ namespace Lucene.Net.Search
/// order, so it's important to return <code>true</code>
/// here.
/// </summary>
- public abstract bool AcceptsDocsOutOfOrder();
+ public abstract bool AcceptsDocsOutOfOrder(); // LUCENENET TODO: Change this to a property getter
}
}
\ No newline at end of file
[02/18] lucenenet git commit: Implemented missing Lucene41WithOrds
class which was causing some random codec tests to fail sporadically.
Posted by sy...@apache.org.
Implemented missing Lucene41WithOrds class which was causing some random codec tests to fail sporadically.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/406f88a6
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/406f88a6
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/406f88a6
Branch: refs/heads/master
Commit: 406f88a6b778c3942707341902b1d6f5e263ce0f
Parents: 828819d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 07:21:46 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 07:21:46 2016 +0700
----------------------------------------------------------------------
.../Codecs/Lucene41Ords/Lucene41WithOrds.cs | 126 +++++++++++++++++++
.../Lucene.Net.TestFramework.csproj | 1 +
2 files changed, 127 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/406f88a6/src/Lucene.Net.TestFramework/Codecs/Lucene41Ords/Lucene41WithOrds.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/Lucene41Ords/Lucene41WithOrds.cs b/src/Lucene.Net.TestFramework/Codecs/Lucene41Ords/Lucene41WithOrds.cs
new file mode 100644
index 0000000..37f8243
--- /dev/null
+++ b/src/Lucene.Net.TestFramework/Codecs/Lucene41Ords/Lucene41WithOrds.cs
@@ -0,0 +1,126 @@
+\ufeffusing Lucene.Net.Codecs.BlockTerms;
+using Lucene.Net.Codecs.Lucene41;
+using Lucene.Net.Index;
+using Lucene.Net.Util;
+
+namespace Lucene.Net.Codecs.Lucene41Ords
+{
+ public sealed class Lucene41WithOrds : PostingsFormat
+ {
+ public Lucene41WithOrds()
+ : base("Lucene41WithOrds")
+ {
+ }
+
+ public override FieldsConsumer FieldsConsumer(SegmentWriteState state)
+ {
+ PostingsWriterBase docs = new Lucene41PostingsWriter(state);
+
+ // TODO: should we make the terms index more easily
+ // pluggable? Ie so that this codec would record which
+ // index impl was used, and switch on loading?
+ // Or... you must make a new Codec for this?
+ TermsIndexWriterBase indexWriter;
+ bool success = false;
+ try
+ {
+ indexWriter = new FixedGapTermsIndexWriter(state);
+ success = true;
+ }
+ finally
+ {
+ if (!success)
+ {
+ docs.Dispose();
+ }
+ }
+
+ success = false;
+ try
+ {
+ // Must use BlockTermsWriter (not BlockTree) because
+ // BlockTree doens't support ords (yet)...
+ FieldsConsumer ret = new BlockTermsWriter(indexWriter, state, docs);
+ success = true;
+ return ret;
+ }
+ finally
+ {
+ if (!success)
+ {
+ try
+ {
+ docs.Dispose();
+ }
+ finally
+ {
+ indexWriter.Dispose();
+ }
+ }
+ }
+ }
+
+ public override FieldsProducer FieldsProducer(SegmentReadState state)
+ {
+ PostingsReaderBase postings = new Lucene41PostingsReader(state.Directory, state.FieldInfos, state.SegmentInfo, state.Context, state.SegmentSuffix);
+ TermsIndexReaderBase indexReader;
+
+ bool success = false;
+ try
+ {
+ indexReader = new FixedGapTermsIndexReader(state.Directory,
+ state.FieldInfos,
+ state.SegmentInfo.Name,
+ state.TermsIndexDivisor,
+ BytesRef.UTF8SortedAsUnicodeComparer,
+ state.SegmentSuffix, state.Context);
+ success = true;
+ }
+ finally
+ {
+ if (!success)
+ {
+ postings.Dispose();
+ }
+ }
+
+ success = false;
+ try
+ {
+ FieldsProducer ret = new BlockTermsReader(indexReader,
+ state.Directory,
+ state.FieldInfos,
+ state.SegmentInfo,
+ postings,
+ state.Context,
+ state.SegmentSuffix);
+ success = true;
+ return ret;
+ }
+ finally
+ {
+ if (!success)
+ {
+ try
+ {
+ postings.Dispose();
+ }
+ finally
+ {
+ indexReader.Dispose();
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// Extension of freq postings file
+ /// </summary>
+ static readonly string FREQ_EXTENSION = "frq";
+
+ /// <summary>
+ /// Extension of prox postings file
+ /// </summary>
+ static readonly string PROX_EXTENSION = "prx";
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/406f88a6/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index 972bcce..f62716e 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -227,6 +227,7 @@
<Compile Include="Codecs\lucene40\Lucene40SkipListWriter.cs">
<SubType>Code</SubType>
</Compile>
+ <Compile Include="Codecs\Lucene41Ords\Lucene41WithOrds.cs" />
<Compile Include="Codecs\lucene41\Lucene41RWCodec.cs">
<SubType>Code</SubType>
</Compile>
[12/18] lucenenet git commit: Fixed NotImplementedException in
Join.TermsWithScoreCollector.Mv.AcceptsDocsOutOfOrder()
Posted by sy...@apache.org.
Fixed NotImplementedException in Join.TermsWithScoreCollector.Mv.AcceptsDocsOutOfOrder()
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/55024152
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/55024152
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/55024152
Branch: refs/heads/master
Commit: 55024152e8c1b5502417c3d8fdfa5f85f58fc700
Parents: 0f9f0ce
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 10:06:26 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 10:06:26 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Join/TermsWithScoreCollector.cs | 9 ---------
1 file changed, 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/55024152/src/Lucene.Net.Join/TermsWithScoreCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/TermsWithScoreCollector.cs b/src/Lucene.Net.Join/TermsWithScoreCollector.cs
index e823293..f4b2e55 100644
--- a/src/Lucene.Net.Join/TermsWithScoreCollector.cs
+++ b/src/Lucene.Net.Join/TermsWithScoreCollector.cs
@@ -56,8 +56,6 @@ namespace Lucene.Net.Join
}
}
- //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
- //ORIGINAL LINE: @Override public void setScorer(org.apache.lucene.search.Scorer scorer) throws java.io.IOException
public override Scorer Scorer
{
set
@@ -261,8 +259,6 @@ namespace Lucene.Net.Join
}
}
- //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
- //ORIGINAL LINE: @Override public void setNextReader(org.apache.lucene.index.AtomicReaderContext context) throws java.io.IOException
public override AtomicReaderContext NextReader
{
set
@@ -271,11 +267,6 @@ namespace Lucene.Net.Join
}
}
- public override bool AcceptsDocsOutOfOrder()
- {
- throw new NotImplementedException();
- }
-
internal class Avg : Mv
{
private int[] _scoreCounts = new int[InitialArraySize];
[05/18] lucenenet git commit: Fixed "key not found" bug in
Facet.Taxonomy.WriterCache.NameIntCacheLRU
Posted by sy...@apache.org.
Fixed "key not found" bug in Facet.Taxonomy.WriterCache.NameIntCacheLRU
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/5b48b115
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/5b48b115
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/5b48b115
Branch: refs/heads/master
Commit: 5b48b115cf9c6a1f4885827febcc78089a2fa408
Parents: 1fa4ed9
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 07:57:56 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 07:57:56 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5b48b115/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
index cd01527..ce14f49 100644
--- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
@@ -75,7 +75,8 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
internal virtual int? Get(FacetLabel name)
{
- int? res = cache[Key(name)];
+ object key = Key(name);
+ int? res = cache.ContainsKey(key) ? cache[key] : null;
if (res == null)
{
nMisses++;
[07/18] lucenenet git commit: Fixed "key not found" bug in
Join.TestJoinUtil
Posted by sy...@apache.org.
Fixed "key not found" bug in Join.TestJoinUtil
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/8b210c02
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/8b210c02
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/8b210c02
Branch: refs/heads/master
Commit: 8b210c02c95f8c527b66b5dda9967c341235a758
Parents: 3612a6e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 08:04:35 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 08:04:35 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Tests.Join/TestJoinUtil.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8b210c02/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
index 7e20840..a254997 100644
--- a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
+++ b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
@@ -1063,7 +1063,7 @@ namespace Lucene.Net.Tests.Join
}
FixedBitSet expectedResult = new FixedBitSet(topLevelReader.MaxDoc);
- IList<RandomDoc> matchingDocs = randomValueDocs[queryValue];
+ IList<RandomDoc> matchingDocs = randomValueDocs.ContainsKey(queryValue) ? randomValueDocs[queryValue] : null;
if (matchingDocs == null)
{
return new FixedBitSet(topLevelReader.MaxDoc);
[06/18] lucenenet git commit: Implemented missing
Join.TermsCollector.AcceptsDocsOutOfOrder() method.
Posted by sy...@apache.org.
Implemented missing Join.TermsCollector.AcceptsDocsOutOfOrder() method.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/3612a6e2
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/3612a6e2
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/3612a6e2
Branch: refs/heads/master
Commit: 3612a6e29333610c204d15f8461857a2e35cdf7f
Parents: 5b48b11
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 08:03:58 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 08:03:58 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Join/TermsCollector.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3612a6e2/src/Lucene.Net.Join/TermsCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/TermsCollector.cs b/src/Lucene.Net.Join/TermsCollector.cs
index 2ccf1ed..8aa396d 100644
--- a/src/Lucene.Net.Join/TermsCollector.cs
+++ b/src/Lucene.Net.Join/TermsCollector.cs
@@ -93,7 +93,7 @@ namespace Lucene.Net.Join
public override bool AcceptsDocsOutOfOrder()
{
- throw new System.NotImplementedException();
+ return true;
}
}
[16/18] lucenenet git commit: Fixed "index out of range" and "key not
found" bugs in Facet.Taxonomy.TestTaxonomyFacetCounts
Posted by sy...@apache.org.
Fixed "index out of range" and "key not found" bugs in Facet.Taxonomy.TestTaxonomyFacetCounts
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/132da593
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/132da593
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/132da593
Branch: refs/heads/master
Commit: 132da59331a3f9e9f1ed4a276cb79e7118617095
Parents: 9313ff9
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 11:02:05 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 11:02:05 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/132da593/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
index a2b412e..72390e2 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetCounts.cs
@@ -791,7 +791,7 @@ namespace Lucene.Net.Facet.Taxonomy
var expectedCounts = new List<Dictionary<string, int?>>();
for (int i = 0; i < numDims; i++)
{
- expectedCounts[i] = new Dictionary<string, int?>();
+ expectedCounts.Add(new Dictionary<string, int?>());
}
foreach (TestDoc doc in testDocs)
@@ -802,7 +802,7 @@ namespace Lucene.Net.Facet.Taxonomy
{
if (doc.dims[j] != null)
{
- int? v = expectedCounts[j][doc.dims[j]];
+ int? v = expectedCounts[j].ContainsKey(doc.dims[j]) ? expectedCounts[j][doc.dims[j]] : null;
if (v == null)
{
expectedCounts[j][doc.dims[j]] = 1;
[13/18] lucenenet git commit: Fixed bugs in the Join.TestJoinUtil
that were causing the TestSingleValueRandomJoin() test to fail.
Posted by sy...@apache.org.
Fixed bugs in the Join.TestJoinUtil that were causing the TestSingleValueRandomJoin() test to fail.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/5b9b2fed
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/5b9b2fed
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/5b9b2fed
Branch: refs/heads/master
Commit: 5b9b2fedcd24523cb548054903a64e724e379e07
Parents: 5502415
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 10:22:11 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 10:22:11 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Tests.Join/TestJoinUtil.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/5b9b2fed/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
index 1d2da10..4e25017 100644
--- a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
+++ b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
@@ -892,7 +892,7 @@ namespace Lucene.Net.Tests.Join
private readonly IDictionary<int, JoinScore> _docToJoinScore;
private SortedSetDocValues docTermOrds;
- private readonly BytesRef scratch;
+ private readonly BytesRef scratch = new BytesRef();
private int docBase;
public CollectorAnonymousInnerClassHelper5(TestJoinUtil testJoinUtil, IndexIterationContext context,
@@ -958,7 +958,7 @@ namespace Lucene.Net.Tests.Join
private BinaryDocValues terms;
private int docBase;
- private readonly BytesRef spare;
+ private readonly BytesRef spare = new BytesRef();
public CollectorAnonymousInnerClassHelper6(TestJoinUtil testJoinUtil,
IndexIterationContext context, string toField,
@@ -974,7 +974,7 @@ namespace Lucene.Net.Tests.Join
public override void Collect(int doc)
{
terms.Get(doc, spare);
- JoinScore joinScore = JoinValueToJoinScores[spare];
+ JoinScore joinScore = JoinValueToJoinScores.ContainsKey(spare) ? JoinValueToJoinScores[spare] : null;
if (joinScore == null)
{
return;
[15/18] lucenenet git commit: Changed
Join.TermsIncluingScoreQuery.SVInOrderScorer.outerInstance variable to
protected so its subclass can access it (fixes
Join.TestJoinUtil.TestMultiValueRandomJoin())
Posted by sy...@apache.org.
Changed Join.TermsIncluingScoreQuery.SVInOrderScorer.outerInstance variable to protected so its subclass can access it (fixes Join.TestJoinUtil.TestMultiValueRandomJoin())
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/9313ff9c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/9313ff9c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/9313ff9c
Branch: refs/heads/master
Commit: 9313ff9c89d330b718773808ba7d01faf7d02f02
Parents: 0fd8d34
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 10:58:19 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 10:58:19 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Join/TermsIncludingScoreQuery.cs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9313ff9c/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs b/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
index 9f3befc..93f2d2e 100644
--- a/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
+++ b/src/Lucene.Net.Join/TermsIncludingScoreQuery.cs
@@ -349,7 +349,7 @@ namespace Lucene.Net.Join
internal class SVInOrderScorer : Scorer
{
- private readonly TermsIncludingScoreQuery outerInstance;
+ protected readonly TermsIncludingScoreQuery outerInstance;
internal readonly DocIdSetIterator matchingDocsIterator;
@@ -427,14 +427,10 @@ namespace Lucene.Net.Join
// This scorer deals with the fact that a document can have more than one score from multiple related documents.
internal class MVInOrderScorer : SVInOrderScorer
{
- private readonly TermsIncludingScoreQuery outerInstance;
-
-
internal MVInOrderScorer(TermsIncludingScoreQuery outerInstance, Weight weight, Bits acceptDocs,
TermsEnum termsEnum, int maxDoc, long cost)
: base(outerInstance, weight, acceptDocs, termsEnum, maxDoc, cost)
{
- this.outerInstance = outerInstance;
}
protected override void FillDocsAndScores(FixedBitSet matchingDocs, Bits acceptDocs,
[09/18] lucenenet git commit: Fixed bugs in
TestOpenIfChangedMergedSegment() and
TestOpenIfChangedNoChangesButSegmentMerges() in
Facet.Taxonomy.Directory.TestDirectoryTaxonomyReader that caused them to
throw null reference exceptions and fail.
Posted by sy...@apache.org.
Fixed bugs in TestOpenIfChangedMergedSegment() and TestOpenIfChangedNoChangesButSegmentMerges() in Facet.Taxonomy.Directory.TestDirectoryTaxonomyReader that caused them to throw null reference exceptions and fail.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1727c1b3
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1727c1b3
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1727c1b3
Branch: refs/heads/master
Commit: 1727c1b3f84562d3718a7de0b86b51712507d26a
Parents: 694676c
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 09:47:53 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 09:47:53 2016 +0700
----------------------------------------------------------------------
.../Directory/TestDirectoryTaxonomyReader.cs | 32 +++++++++++---------
1 file changed, 17 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1727c1b3/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
index 15f30df..74ba8fe 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/Directory/TestDirectoryTaxonomyReader.cs
@@ -297,7 +297,12 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
// hold onto IW to forceMerge
// note how we don't close it, since DTW will close it.
IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetMergePolicy(new LogByteSizeMergePolicy()));
- var writer = new DirectoryTaxonomyWriterAnonymousInnerClassHelper2(this, dir, iw) as DirectoryTaxonomyWriter;
+
+ // LUCENENET: We need to set the index writer before the constructor of the base class is called
+ // because the DirectoryTaxonomyWriter class constructor is the consumer of the OpenIndexWriter method.
+ // The only option seems to be to set it statically before creating the instance.
+ DirectoryTaxonomyWriterAnonymousInnerClassHelper2.iw = iw;
+ var writer = new DirectoryTaxonomyWriterAnonymousInnerClassHelper2(dir);
var reader = new DirectoryTaxonomyReader(writer);
Assert.AreEqual(1, reader.Size);
@@ -323,15 +328,11 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
private class DirectoryTaxonomyWriterAnonymousInnerClassHelper2 : DirectoryTaxonomyWriter
{
- private readonly TestDirectoryTaxonomyReader outerInstance;
-
- private IndexWriter iw;
- private IndexWriterConfig config;
+ internal static IndexWriter iw = null;
- public DirectoryTaxonomyWriterAnonymousInnerClassHelper2(TestDirectoryTaxonomyReader outerInstance, Directory dir, IndexWriter iw) : base(dir)
+ public DirectoryTaxonomyWriterAnonymousInnerClassHelper2(Directory dir)
+ : base(dir)
{
- this.outerInstance = outerInstance;
- this.iw = iw;
}
protected override IndexWriter OpenIndexWriter(Directory directory, IndexWriterConfig config)
@@ -352,7 +353,12 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
// hold onto IW to forceMerge
// note how we don't close it, since DTW will close it.
var iw = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random())).SetMergePolicy(new LogByteSizeMergePolicy()));
- DirectoryTaxonomyWriter writer = new DirectoryTaxonomyWriterAnonymousInnerClassHelper3(this, dir, iw);
+
+ // LUCENENET: We need to set the index writer before the constructor of the base class is called
+ // because the DirectoryTaxonomyWriter class constructor is the consumer of the OpenIndexWriter method.
+ // The only option seems to be to set it statically before creating the instance.
+ DirectoryTaxonomyWriterAnonymousInnerClassHelper3.iw = iw;
+ DirectoryTaxonomyWriter writer = new DirectoryTaxonomyWriterAnonymousInnerClassHelper3(dir);
// add a category so that the following DTR open will cause a flush and
@@ -381,15 +387,11 @@ namespace Lucene.Net.Facet.Taxonomy.Directory
private class DirectoryTaxonomyWriterAnonymousInnerClassHelper3 : DirectoryTaxonomyWriter
{
- private readonly TestDirectoryTaxonomyReader outerInstance;
+ internal static IndexWriter iw;
- private IndexWriter iw;
-
- public DirectoryTaxonomyWriterAnonymousInnerClassHelper3(TestDirectoryTaxonomyReader outerInstance, Directory dir, IndexWriter iw)
+ public DirectoryTaxonomyWriterAnonymousInnerClassHelper3(Directory dir)
: base(dir)
{
- this.outerInstance = outerInstance;
- this.iw = iw;
}
protected override IndexWriter OpenIndexWriter(Directory directory, IndexWriterConfig config)
[14/18] lucenenet git commit: Fixed "out of range" and "key not
found" bugs in Facet.Taxonomy.TestTaxonomyFacetSumValueSource.TestRandom()
Posted by sy...@apache.org.
Fixed "out of range" and "key not found" bugs in Facet.Taxonomy.TestTaxonomyFacetSumValueSource.TestRandom()
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/0fd8d346
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/0fd8d346
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/0fd8d346
Branch: refs/heads/master
Commit: 0fd8d3465d54362285f83635871528a5ef888ae2
Parents: 5b9b2fe
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 10:36:54 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 10:36:54 2016 +0700
----------------------------------------------------------------------
.../Taxonomy/TestTaxonomyFacetSumValueSource.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0fd8d346/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
index 21ede3c..e05daa9 100644
--- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
+++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyFacetSumValueSource.cs
@@ -541,10 +541,10 @@ namespace Lucene.Net.Facet.Taxonomy
Facets facets = new TaxonomyFacetSumValueSource(tr, config, fc, values);
// Slow, yet hopefully bug-free, faceting:
- var expectedValues = new List<Dictionary<string, float?>>();
+ var expectedValues = new List<Dictionary<string, float?>>(numDims);
for (int i = 0; i < numDims; i++)
{
- expectedValues[i] = new Dictionary<string, float?>();
+ expectedValues.Add(new Dictionary<string, float?>());
}
foreach (TestDoc doc in testDocs)
@@ -555,7 +555,7 @@ namespace Lucene.Net.Facet.Taxonomy
{
if (doc.dims[j] != null)
{
- float? v = expectedValues[j][doc.dims[j]];
+ float? v = expectedValues[j].ContainsKey(doc.dims[j]) ? expectedValues[j][doc.dims[j]] : null;
if (v == null)
{
expectedValues[j][doc.dims[j]] = doc.value;
[03/18] lucenenet git commit: Fixed some "key not found" bugs in the
Join.TestJoinUtil class.
Posted by sy...@apache.org.
Fixed some "key not found" bugs in the Join.TestJoinUtil class.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/22663d7a
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/22663d7a
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/22663d7a
Branch: refs/heads/master
Commit: 22663d7ae0642af5f3adc59618413b55d48acab3
Parents: 406f88a
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 07:43:11 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 07:43:11 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Tests.Join/TestJoinUtil.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/22663d7a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
index 81513c7..7e20840 100644
--- a/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
+++ b/src/Lucene.Net.Tests.Join/TestJoinUtil.cs
@@ -796,7 +796,7 @@ namespace Lucene.Net.Tests.Join
while ((ord = docTermOrds.NextOrd()) != SortedSetDocValues.NO_MORE_ORDS)
{
docTermOrds.LookupOrd(ord, joinValue);
- var joinScore = JoinValueToJoinScores[joinValue];
+ var joinScore = JoinValueToJoinScores.ContainsKey(joinValue) ? JoinValueToJoinScores[joinValue] : null;
if (joinScore == null)
{
JoinValueToJoinScores[BytesRef.DeepCopyOf(joinValue)] = joinScore = new JoinScore();
@@ -855,7 +855,7 @@ namespace Lucene.Net.Tests.Join
return;
}
- var joinScore = JoinValueToJoinScores[joinValue];
+ var joinScore = JoinValueToJoinScores.ContainsKey(joinValue) ? JoinValueToJoinScores[joinValue] : null;
if (joinScore == null)
{
JoinValueToJoinScores[BytesRef.DeepCopyOf(joinValue)] = joinScore = new JoinScore();
@@ -912,7 +912,7 @@ namespace Lucene.Net.Tests.Join
while ((ord = docTermOrds.NextOrd()) != SortedSetDocValues.NO_MORE_ORDS)
{
docTermOrds.LookupOrd(ord, scratch);
- JoinScore joinScore = _joinValueToJoinScores[scratch];
+ JoinScore joinScore = _joinValueToJoinScores.ContainsKey(scratch) ? _joinValueToJoinScores[scratch] : null;
if (joinScore == null)
{
continue;
[04/18] lucenenet git commit: Added missing call to
Queries.Function.ValueSources.TermFreqValueSource.Reset(),
which was causing the Queries.Function.TestValueSources.TestTermFreq() test to
fail.
Posted by sy...@apache.org.
Added missing call to Queries.Function.ValueSources.TermFreqValueSource.Reset(), which was causing the Queries.Function.TestValueSources.TestTermFreq() test to fail.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1fa4ed9b
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1fa4ed9b
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1fa4ed9b
Branch: refs/heads/master
Commit: 1fa4ed9bda6ba35d4497345da18346ca86aea412
Parents: 22663d7
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 07:54:49 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 07:54:49 2016 +0700
----------------------------------------------------------------------
.../Function/ValueSources/TermFreqValueSource.cs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1fa4ed9b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
index 69888e0..8f846d1 100644
--- a/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
+++ b/src/Lucene.Net.Queries/Function/ValueSources/TermFreqValueSource.cs
@@ -64,17 +64,13 @@ namespace Lucene.Net.Queries.Function.ValueSources
this.outerInstance = outerInstance;
this.terms = terms;
lastDocRequested = -1;
+ Reset();
}
private DocsEnum docs;
private int atDoc;
private int lastDocRequested;
- //JAVA TO C# CONVERTER TODO TASK: Initialization blocks declared within anonymous inner classes are not converted:
- // {
- // reset();
- // }
-
public virtual void Reset()
{
// no one should call us for deleted docs?
[17/18] lucenenet git commit: Bug (memory leak): Dispose() should
cascade to Dispose() to other objects and release its own resources.
Posted by sy...@apache.org.
Bug (memory leak): Dispose() should cascade to Dispose() to other objects and release its own resources.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/9124e03e
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/9124e03e
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/9124e03e
Branch: refs/heads/master
Commit: 9124e03e9240b2bb21b985526466c4e1f9674d6b
Parents: 132da59
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Aug 20 19:15:42 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 11:26:48 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Core/Analysis/Tokenizer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/9124e03e/src/Lucene.Net.Core/Analysis/Tokenizer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Analysis/Tokenizer.cs b/src/Lucene.Net.Core/Analysis/Tokenizer.cs
index b0215be..a354310 100644
--- a/src/Lucene.Net.Core/Analysis/Tokenizer.cs
+++ b/src/Lucene.Net.Core/Analysis/Tokenizer.cs
@@ -73,7 +73,7 @@ namespace Lucene.Net.Analysis
/// </summary>
public override void Dispose()
{
- input.Close();
+ input.Dispose();
// LUCENE-2387: don't hold onto Reader after close, so
// GC can reclaim
InputPending = ILLEGAL_STATE_READER;
[18/18] lucenenet git commit: Increased timeout values of long
running tests so they will have ample time to complete.
Posted by sy...@apache.org.
Increased timeout values of long running tests so they will have ample time to complete.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/bb59767c
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/bb59767c
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/bb59767c
Branch: refs/heads/master
Commit: bb59767c6622fca06e11b9a6c29d19901b2df236
Parents: 9124e03
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Aug 21 12:39:57 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sun Aug 21 12:39:57 2016 +0700
----------------------------------------------------------------------
.../core/Codecs/Lucene41/TestBlockPostingsFormat3.cs | 2 +-
src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs | 2 +-
src/Lucene.Net.Tests/core/Index/TestTermdocPerf.cs | 2 +-
src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs | 3 ++-
src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs | 4 ++--
src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs | 2 +-
6 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb59767c/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat3.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat3.cs b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat3.cs
index 6552584..44e268c 100644
--- a/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat3.cs
+++ b/src/Lucene.Net.Tests/core/Codecs/Lucene41/TestBlockPostingsFormat3.cs
@@ -72,7 +72,7 @@ namespace Lucene.Net.Codecs.Lucene41
internal static readonly int MAXDOC = Lucene41PostingsFormat.BLOCK_SIZE * 20;
// creates 8 fields with different options and does "duels" of fields against each other
- [Test, LongRunningTest]
+ [Test, LongRunningTest, Timeout(50000)]
public virtual void Test()
{
Directory dir = NewDirectory();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb59767c/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs b/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
index 9c89305..ba08f6c 100644
--- a/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestBinaryDocValuesUpdates.cs
@@ -1612,7 +1612,7 @@ namespace Lucene.Net.Index
dir.Dispose();
}
- [Test, LongRunningTest]
+ [Test, LongRunningTest, Timeout(40000)]
public virtual void TestTonsOfUpdates()
{
// LUCENE-5248: make sure that when there are many updates, we don't use too much RAM
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb59767c/src/Lucene.Net.Tests/core/Index/TestTermdocPerf.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestTermdocPerf.cs b/src/Lucene.Net.Tests/core/Index/TestTermdocPerf.cs
index 1f7dd36..c1538c1 100644
--- a/src/Lucene.Net.Tests/core/Index/TestTermdocPerf.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestTermdocPerf.cs
@@ -163,7 +163,7 @@ namespace Lucene.Net.Index
return ret;
}
- [Test, LongRunningTest]
+ [Test, LongRunningTest, Timeout(120000)]
public virtual void TestTermDocPerf()
{
// performance test for 10% of documents containing a term
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb59767c/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs b/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
index 4cd8d3c..a124089 100644
--- a/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
+++ b/src/Lucene.Net.Tests/core/Search/TestAutomatonQuery.cs
@@ -5,6 +5,7 @@ using System.Threading;
namespace Lucene.Net.Search
{
+ using Attributes;
using NUnit.Framework;
using Automaton = Lucene.Net.Util.Automaton.Automaton;
using AutomatonTestUtil = Lucene.Net.Util.Automaton.AutomatonTestUtil;
@@ -222,7 +223,7 @@ namespace Lucene.Net.Search
Assert.AreEqual(0, AutomatonQueryNrHits(aq));
}
- [Test]
+ [Test, LongRunningTest, Timeout(40000)]
public virtual void TestHashCodeWithThreads()
{
AutomatonQuery[] queries = new AutomatonQuery[1000];
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb59767c/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
index 36201af..9020f3b 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
@@ -304,7 +304,7 @@ namespace Lucene.Net.Util.Packed
}
}
- [Test, LongRunningTest]
+ [Test, LongRunningTest, Timeout(50000)]
public virtual void TestMonotoneSequencesLonger()
{
for (int s = 2; s < 4422; s++)
@@ -333,7 +333,7 @@ namespace Lucene.Net.Util.Packed
}
}
- [Test, LongRunningTest]
+ [Test, LongRunningTest, Timeout(50000)]
public virtual void TestStrictMonotoneSequencesLonger()
{
for (int s = 2; s < 4422; s++)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bb59767c/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs b/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
index 7e63c67..42e305a 100644
--- a/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
+++ b/src/Lucene.Net.Tests/core/Util/TestPagedBytes.cs
@@ -179,7 +179,7 @@ namespace Lucene.Net.Util
}
[Test]
- [LongRunningTest]
+ [LongRunningTest, Timeout(120000)]
public virtual void TestOverflow() // memory hole
{
BaseDirectoryWrapper dir = NewFSDirectory(CreateTempDir("testOverflow"));