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/12 13:20:45 UTC
[31/34] lucenenet git commit: Adding LUCENENET specific documentation
Adding LUCENENET specific documentation
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/be84fe26
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/be84fe26
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/be84fe26
Branch: refs/heads/lucenenet-indexablefield-api
Commit: be84fe26e92a2c11613978d73f01d6eb662ca922
Parents: 1863bb8
Author: Connie Yau <co...@microsoft.com>
Authored: Mon Aug 8 11:40:25 2016 -0700
Committer: Connie Yau <co...@microsoft.com>
Committed: Mon Aug 8 11:40:25 2016 -0700
----------------------------------------------------------------------
.../Index/RandomIndexWriter.cs | 38 +++++++++++---------
.../core/Index/TestIndexWriter.cs | 14 ++++++++
.../core/Index/TestIndexWriterCommit.cs | 12 +++++++
.../core/Index/TestIndexWriterForceMerge.cs | 6 ++++
4 files changed, 54 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be84fe26/src/Lucene.Net.TestFramework/Index/RandomIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/RandomIndexWriter.cs b/src/Lucene.Net.TestFramework/Index/RandomIndexWriter.cs
index b19794e..b0d6b69 100644
--- a/src/Lucene.Net.TestFramework/Index/RandomIndexWriter.cs
+++ b/src/Lucene.Net.TestFramework/Index/RandomIndexWriter.cs
@@ -8,21 +8,21 @@ using Lucene.Net.Util;
namespace Lucene.Net.Index
{
/*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-* contributor license agreements. See the NOTICE file distributed with
-* this work for additional information regarding copyright ownership.
-* The ASF licenses this file to You under the Apache License, Version 2.0
-* (the "License"); you may not use this file except in compliance with
-* the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
using Analyzer = Lucene.Net.Analysis.Analyzer;
using BytesRef = Lucene.Net.Util.BytesRef;
@@ -99,7 +99,13 @@ namespace Lucene.Net.Index
}
/// <summary>
- /// create a RandomIndexWriter with a random config </summary>
+ /// Creates a RandomIndexWriter with a random config
+ ///
+ /// LUCENENET specific
+ /// This override allows a RandomIndexWriter to be created without
+ /// adding a dependency on the LuceneTestCase.ClassEnv.Similarity and
+ /// LuceneTestCase.ClassEnv.TimeZone property
+ /// </summary>
public RandomIndexWriter(Random r, Directory dir, LuceneVersion v, Analyzer a, Similarity similarity, TimeZone timezone)
: this(r, dir, LuceneTestCase.NewIndexWriterConfig(r, v, a, similarity, timezone))
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be84fe26/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
index 45f0640..02317d0 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriter.cs
@@ -145,6 +145,13 @@ namespace Lucene.Net.Index
dir.Dispose();
}
+ /// <summary>
+ /// LUCENENET specific
+ ///
+ /// Changed from internal static method to private to remove
+ /// inter-dependencies between TestIndexWriter*.cs, TestAddIndexes.cs
+ /// and TestDeletionPolicy.cs tests
+ /// </summary>
private void AddDoc(IndexWriter writer)
{
Document doc = new Document();
@@ -152,6 +159,13 @@ namespace Lucene.Net.Index
writer.AddDocument(doc);
}
+ /// <summary>
+ /// LUCENENET specific
+ ///
+ /// Changed from internal static method to private to remove
+ /// inter-dependencies between TestIndexWriter*.cs, TestAddIndexes.cs
+ /// and TestDeletionPolicy.cs tests
+ /// </summary>
private void AddDocWithIndex(IndexWriter writer, int index)
{
Document doc = new Document();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be84fe26/src/Lucene.Net.Tests/core/Index/TestIndexWriterCommit.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterCommit.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterCommit.cs
index 3f06879..b2b6eda 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterCommit.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterCommit.cs
@@ -737,6 +737,12 @@ namespace Lucene.Net.Index
dir.Dispose();
}
+ /// <summary>
+ /// LUCENENET specific
+ ///
+ /// Copied from <see cref="TestIndexWriter.AddDoc(IndexWriter)"/>
+ /// to remove inter-class dependency on <see cref="TestIndexWriter"/>
+ /// </summary>
private void AddDoc(IndexWriter writer)
{
Document doc = new Document();
@@ -744,6 +750,12 @@ namespace Lucene.Net.Index
writer.AddDocument(doc);
}
+ /// <summary>
+ /// LUCENENET specific
+ ///
+ /// Copied from <seealso cref="TestIndexWriter.AddDocWithIndex(IndexWriter, int)"/>
+ /// to remove inter-class dependency on <see cref="TestIndexWriter"/>.
+ /// </summary>
private void AddDocWithIndex(IndexWriter writer, int index)
{
Document doc = new Document();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/be84fe26/src/Lucene.Net.Tests/core/Index/TestIndexWriterForceMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Index/TestIndexWriterForceMerge.cs b/src/Lucene.Net.Tests/core/Index/TestIndexWriterForceMerge.cs
index 33f1063..9cd2192 100644
--- a/src/Lucene.Net.Tests/core/Index/TestIndexWriterForceMerge.cs
+++ b/src/Lucene.Net.Tests/core/Index/TestIndexWriterForceMerge.cs
@@ -236,6 +236,12 @@ namespace Lucene.Net.Index
dir.Dispose();
}
+ /// <summary>
+ /// LUCENENET specific
+ ///
+ /// Copied from <seealso cref="TestIndexWriter.AddDoc(IndexWriter)"/>
+ /// to remove inter-class dependency on TestIndexWriter.
+ /// </summary>
private void AddDoc(IndexWriter writer)
{
Document doc = new Document();