diff --git a/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs b/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs index 6c286077ad..c6f222290c 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs @@ -21,11 +21,13 @@ namespace Lucene.Net.Analysis.Ja.Util */ /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: analysis kuromoji-build-dictionary. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// analysis kuromoji-build-dictionary. /// public static class DictionaryBuilder // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { @@ -70,11 +72,13 @@ ConnectionCostsWriter connectionCosts } /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: analysis kuromoji-build-dictionary. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// analysis kuromoji-build-dictionary. /// public static void Main(string[] args) { diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs index a1900ab4b0..d7790b475d 100644 --- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs +++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs @@ -66,13 +66,14 @@ namespace Egothor.Stemmer { /// /// The Compile class is used to compile a stemmer table. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: analysis stempel-compile-stems - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// analysis stempel-compile-stems /// public static class Compile // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { @@ -81,19 +82,20 @@ public static class Compile // LUCENENET specific: CA1052 Static holder types sh private static Trie trie; /// - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: analysis stempel-compile-stems. - /// /// Entry point to the Compile application. - /// + /// /// This program takes any number of arguments: the first is the name of the /// desired stemming algorithm to use (a list is available in the package /// description) , all of the rest should be the path or paths to a file or /// files containing a stemmer table to compile. + /// + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a + /// method within a DLL can't be directly called from the command line so we + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// analysis stempel-compile-stems /// /// the command line arguments public static void Main(string[] args) diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs index 1cbca9e6e3..f1053e94af 100644 --- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs +++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs @@ -65,15 +65,16 @@ created by Leo Galambos (Leo.G@seznam.cz). namespace Egothor.Stemmer { /// - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: analysis stempel-patch-stems. - /// /// The DiffIt class is a means generate patch commands from an already prepared /// stemmer table. + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a + /// method within a DLL can't be directly called from the command line so we + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// analysis stempel-patch-stems /// public static class DiffIt // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { @@ -89,19 +90,19 @@ internal static int Get(int i, string s) } /// - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: analysis stempel-patch-stems. - /// /// Entry point to the DiffIt application. - /// + /// /// This application takes one argument, the path to a file containing a /// stemmer table. The program reads the file and generates the patch commands /// for the stems. - /// + /// + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a + /// method within a DLL can't be directly called from the command line so we + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// analysis stempel-patch-stems /// /// the path to a file containing a stemmer table public static void Main(string[] args) diff --git a/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs b/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs index 062f0a0554..8f04e2fda1 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs @@ -97,14 +97,15 @@ public virtual void Execute() } /// - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: benchmark. - /// /// Run the benchmark algorithm. + /// + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a + /// method within a DLL can't be directly called from the command line so we + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// benchmark /// /// Benchmark config and algorithm files. public static void Main(string[] args) @@ -127,7 +128,7 @@ public static void Exec(string[] args) //Environment.Exit(1); } - // verify input files + // verify input files FileInfo algFile = new FileInfo(args[0]); if (!algFile.Exists /*|| !algFile.isFile() ||!algFile.canRead()*/ ) { diff --git a/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs b/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs index 4adbb11df2..1e7500faa8 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs @@ -24,25 +24,28 @@ namespace Lucene.Net.Benchmarks.ByTask.Programmatic /// /// Sample performance test written programmatically - no algorithm file is needed here. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: benchmark sample. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// benchmark sample /// public static class Sample // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: benchmark sample. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// benchmark sample /// - /// + /// The command line arguments [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Sample shows optional args[] parameter")] public static void Main(string[] args) { diff --git a/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs b/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs index 7aa63d3f5f..482c6130a2 100644 --- a/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs +++ b/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs @@ -31,26 +31,28 @@ namespace Lucene.Net.Benchmarks.Quality.Trec /// /// Command-line tool for doing a TREC evaluation run. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: benchmark run-trec-eval. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// benchmark run-trec-eval /// public static class QueryDriver // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: benchmark run-trec-eval. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// benchmark run-trec-eval /// /// Must contain 4 or 5 values - /// + /// Thrown if the incorrect number of arguments are provided. public static void Main(string[] args) { if (args.Length < 4 || args.Length > 5) diff --git a/src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs b/src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs index 3cccd41b15..62f23ec399 100644 --- a/src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs +++ b/src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs @@ -27,13 +27,14 @@ namespace Lucene.Net.Benchmarks.Quality.Utils /// /// Suggest Quality queries based on an index contents. /// Utility class, used for making quality test benchmarks. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: benchmark find-quality-queries. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// benchmark find-quality-queries /// public class QualityQueriesFinder { @@ -50,11 +51,13 @@ private QualityQueriesFinder(Store.Directory dir) } /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: benchmark find-quality-queries. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// benchmark find-quality-queries /// /// {index-dir} /// if cannot access the index. diff --git a/src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs b/src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs index ffbade0356..be1f79aa2f 100644 --- a/src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs +++ b/src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs @@ -133,13 +133,15 @@ protected virtual void ExtractFile(FileInfo sgmFile) } /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: benchmark extract-reuters. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// benchmark extract-reuters /// - /// + /// The command line arguments public static void Main(string[] args) { if (args.Length != 2) diff --git a/src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs b/src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs index 2e09ad8c23..d25bceb2f4 100644 --- a/src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs +++ b/src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs @@ -119,13 +119,15 @@ public virtual void Extract() } /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: benchmark extract-wikipedia. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// benchmark extract-wikipedia /// - /// + /// The command line arguments public static void Main(string[] args) { diff --git a/src/Lucene.Net.Demo/Facet/AssociationsFacetsExample.cs b/src/Lucene.Net.Demo/Facet/AssociationsFacetsExample.cs index cb0e4fb665..8fda2e5764 100644 --- a/src/Lucene.Net.Demo/Facet/AssociationsFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/AssociationsFacetsExample.cs @@ -43,8 +43,8 @@ public class AssociationsFacetsExample /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -157,17 +157,8 @@ public FacetResult RunDrillDown() } - /// - /// Runs the sum int/float associations examples and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo associations-facets. - /// - /// - /// Unused + /// Runs the sum int/float associations examples and prints the results. + /// The command line arguments [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Demo shows use of optional args argument")] public static void Main(string[] args) { diff --git a/src/Lucene.Net.Demo/Facet/DistanceFacetsExample.cs b/src/Lucene.Net.Demo/Facet/DistanceFacetsExample.cs index 68a52950e6..ba05f0e3bc 100644 --- a/src/Lucene.Net.Demo/Facet/DistanceFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/DistanceFacetsExample.cs @@ -50,8 +50,8 @@ public sealed class DistanceFacetsExample : IDisposable /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -263,16 +263,8 @@ public void Dispose() indexDir?.Dispose(); } - /// - /// Runs the search and drill-down examples and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo distance-facets. - /// - /// + /// Runs the search and drill-down examples and prints the results. + /// The command line arguments public static void Main(string[] args) { using DistanceFacetsExample example = new DistanceFacetsExample(); diff --git a/src/Lucene.Net.Demo/Facet/ExpressionAggregationFacetsExample.cs b/src/Lucene.Net.Demo/Facet/ExpressionAggregationFacetsExample.cs index 3a4dc95482..b2c752d0b0 100644 --- a/src/Lucene.Net.Demo/Facet/ExpressionAggregationFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/ExpressionAggregationFacetsExample.cs @@ -44,8 +44,8 @@ public class ExpressionAggregationFacetsExample /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -115,17 +115,8 @@ public FacetResult RunSearch() return Search(); } - /// - /// Runs the search and drill-down examples and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo expression-aggregation-facets. - /// - /// - /// Unused + /// Runs the search and drill-down examples and prints the results. + /// The command line arguments public static void Main(string[] args) { Console.WriteLine("Facet counting example:"); diff --git a/src/Lucene.Net.Demo/Facet/MultiCategoryListsFacetsExample.cs b/src/Lucene.Net.Demo/Facet/MultiCategoryListsFacetsExample.cs index 5e3e71b232..b32fe3761e 100644 --- a/src/Lucene.Net.Demo/Facet/MultiCategoryListsFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/MultiCategoryListsFacetsExample.cs @@ -42,8 +42,8 @@ public class MultiCategoryListsFacetsExample /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -134,17 +134,8 @@ public IList RunSearch() return Search(); } - /// - /// Runs the search example and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo multi-category-lists-facets. - /// - /// - /// Unused + /// Runs the search example and prints the results. + /// The command line arguments public static void Main(string[] args) { Console.WriteLine("Facet counting over multiple category lists example:"); diff --git a/src/Lucene.Net.Demo/Facet/RangeFacetsExample.cs b/src/Lucene.Net.Demo/Facet/RangeFacetsExample.cs index 5352f9a693..8e05b7b68b 100644 --- a/src/Lucene.Net.Demo/Facet/RangeFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/RangeFacetsExample.cs @@ -40,8 +40,8 @@ public sealed class RangeFacetsExample : IDisposable /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -125,17 +125,8 @@ public void Dispose() indexDir?.Dispose(); } - /// - /// Runs the search and drill-down examples and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo range-facets. - /// - /// - /// Unused + /// Runs the search and drill-down examples and prints the results. + /// The command line arguments public static void Main(string[] args) { using RangeFacetsExample example = new RangeFacetsExample(); diff --git a/src/Lucene.Net.Demo/Facet/SimpleFacetsExample.cs b/src/Lucene.Net.Demo/Facet/SimpleFacetsExample.cs index 6b64ea7f6d..b4c1c0c6d7 100644 --- a/src/Lucene.Net.Demo/Facet/SimpleFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/SimpleFacetsExample.cs @@ -42,8 +42,8 @@ public class SimpleFacetsExample /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -233,17 +233,8 @@ public IList RunDrillSideways() return DrillSideways(); } - /// - /// Runs the search and drill-down examples and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo simple-facets. - /// - /// - /// Unused + /// Runs the search and drill-down examples and prints the results. + /// The command line arguments public static void Main(string[] args) { Console.WriteLine("Facet counting example:"); diff --git a/src/Lucene.Net.Demo/Facet/SimpleSortedSetFacetsExample.cs b/src/Lucene.Net.Demo/Facet/SimpleSortedSetFacetsExample.cs index 557dc80ee0..000fcba064 100644 --- a/src/Lucene.Net.Demo/Facet/SimpleSortedSetFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/SimpleSortedSetFacetsExample.cs @@ -35,7 +35,7 @@ namespace Lucene.Net.Demo.Facet { /// /// Shows simple usage of faceted indexing and search - /// using and + /// using and /// . /// public class SimpleSortedSetFacetsExample @@ -43,8 +43,8 @@ public class SimpleSortedSetFacetsExample /// /// Using a constant for all functionality related to a specific index /// is the best strategy. This allows you to upgrade Lucene.Net first - /// and plan the upgrade of the index binary format for a later time. - /// Once the index is upgraded, you simply need to update the constant + /// and plan the upgrade of the index binary format for a later time. + /// Once the index is upgraded, you simply need to update the constant /// version and redeploy your application. /// private const LuceneVersion EXAMPLE_VERSION = LuceneVersion.LUCENE_48; @@ -151,17 +151,8 @@ public FacetResult RunDrillDown() return DrillDown(); } - /// Runs the search and drill-down examples and prints the results. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo simple-sorted-set-facets. - /// - /// - /// Unused + /// Runs the search and drill-down examples and prints the results. + /// The command line arguments public static void Main(string[] args) { Console.WriteLine("Facet counting example:"); diff --git a/src/Lucene.Net.Demo/IndexFiles.cs b/src/Lucene.Net.Demo/IndexFiles.cs index e9dc565f72..ba3173c99d 100644 --- a/src/Lucene.Net.Demo/IndexFiles.cs +++ b/src/Lucene.Net.Demo/IndexFiles.cs @@ -31,47 +31,27 @@ namespace Lucene.Net.Demo { - // LUCENENET: Not used - ///// Run it with no command-line arguments for usage information. - - /// /// Index all text files under a directory. /// /// This is a command-line application demonstrating simple Lucene indexing. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: demo index-files. - /// /// public static class IndexFiles // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { - /// - /// Index all text files under a directory. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo index-files. - /// - /// - /// + /// Index all text files under a directory. + /// The command line arguments public static void Main(string[] args) { // The should be the assembly name of the application // this code is compiled into. In .NET Framework, it is the name of the EXE file. - // In .NET Core, you have the option of compiling this into either an EXE or a DLL + // In .NET Core, you have the option of compiling this into either an EXE or a DLL // (see https://docs.microsoft.com/en-us/dotnet/core/deploying/index). // In the latter case, the will be "dotnet .dll". string usage = "Usage: " + "[-u|--update]\n\n" + "This indexes the documents in , creating a Lucene index" + "in that can be searched with the search-files demo."; - + // Validate required arguments are present. // If not, show usage information. if (args.Length < 2) @@ -150,15 +130,15 @@ public static void Main(string[] args) } /// - /// Recurses over files and directories found under the + /// Recurses over files and directories found under the /// given directory and indexes each file. - /// - /// NOTE: This method indexes one document per input file. - /// This is slow. For good throughput, put multiple documents + /// + /// NOTE: This method indexes one document per input file. + /// This is slow. For good throughput, put multiple documents /// into your input file(s). /// /// - /// to the index where the given + /// to the index where the given /// file/dir info will be stored /// /// @@ -183,7 +163,7 @@ internal static void IndexDocs(IndexWriter writer, DirectoryInfo directoryInfo) /// Indexes the given file using the given writer. /// /// - /// to the index where the given + /// to the index where the given /// file info will be stored. /// /// @@ -199,7 +179,7 @@ internal static void IndexDocs(IndexWriter writer, FileInfo file) Document doc = new Document(); // Add the path of the file as a field named "path". Use a - // field that is indexed (i.e. searchable), but don't tokenize + // field that is indexed (i.e. searchable), but don't tokenize // the field into separate words and don't index term frequency // or positional information: Field pathField = new StringField("path", file.FullName, Field.Store.YES); @@ -228,8 +208,8 @@ internal static void IndexDocs(IndexWriter writer, FileInfo file) } else { - // Existing index (an old copy of this document may have been indexed) so - // we use updateDocument instead to replace the old one matching the exact + // Existing index (an old copy of this document may have been indexed) so + // we use updateDocument instead to replace the old one matching the exact // path, if present: Console.WriteLine("updating " + file); writer.UpdateDocument(new Term("path", file.FullName), doc); diff --git a/src/Lucene.Net.Demo/SearchFiles.cs b/src/Lucene.Net.Demo/SearchFiles.cs index 8953ffaaf0..b001396bfe 100644 --- a/src/Lucene.Net.Demo/SearchFiles.cs +++ b/src/Lucene.Net.Demo/SearchFiles.cs @@ -37,32 +37,16 @@ namespace Lucene.Net.Demo { /// /// Simple command-line based search demo. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: demo search-files. - /// /// public static class SearchFiles // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { - /// - /// Simple command-line based search demo. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a - /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: demo search-files. - /// - /// - /// + /// Simple command-line based search demo. + /// The command line arguments public static void Main(string[] args) { // The should be the assembly name of the application // this code is compiled into. In .NET Framework, it is the name of the EXE file. - // In .NET Core, you have the option of compiling this into either a DLL or an EXE + // In .NET Core, you have the option of compiling this into either a DLL or an EXE // (see https://docs.microsoft.com/en-us/dotnet/core/deploying/index). // In the first case, the will be "dotnet .dll". string usage = "Usage: [-f|--field ] " + @@ -70,7 +54,7 @@ public static void Main(string[] args) "[--raw] [-p|--page-size ]\n\n" + "Use no --query or --queries-file option for interactive mode.\n\n" + "See http://lucene.apache.org/core/4_8_0/demo/ for details."; - if (args.Length < 1 || args.Length > 0 && + if (args.Length < 1 || args.Length > 0 && ("?".Equals(args[0], StringComparison.Ordinal) || "-h".Equals(args[0], StringComparison.Ordinal) || "--help".Equals(args[0], StringComparison.Ordinal))) { Console.WriteLine(usage); @@ -184,7 +168,7 @@ public static void Main(string[] args) } /// - /// This demonstrates a typical paging search scenario, where the search engine presents + /// This demonstrates a typical paging search scenario, where the search engine presents /// pages of size n to the user. The user can then go to the next page if interested in /// the next hits. /// @@ -226,7 +210,7 @@ public static void DoPagingSearch(IndexSearcher searcher, Query query, for (int i = start; i < end; i++) { if (raw) // output raw format - { + { Console.WriteLine("doc=" + hits[i].Doc + " score=" + hits[i].Score); continue; } diff --git a/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs b/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs index ee8bed8058..514bfdcf59 100644 --- a/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs +++ b/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs @@ -25,34 +25,32 @@ namespace Lucene.Net.Index /// /// Command-line tool for extracting sub-files out of a compound file. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with two commands that map to that method: index extract-cfs and index list-cfs. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with two commands that map to that method: + /// index extract-cfs and index list-cfs /// public static class CompoundFileExtractor // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { - // LUCENENET: Not used - ///// Usage: org.apache.lucene.index.IndexReader [-extract] <cfsfile> - - /// /// Prints the filename and size of each file within a given compound file. /// Add the -extract flag to extract files to the current working directory. /// In order to make the extracted version of the index work, you have to copy /// the segments file from the compound index into the directory where the extracted files are stored. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with two commands that map to this method: index extract-cfs and index list-cfs. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with two commands that map to this method: + /// index extract-cfs and index list-cfs /// - /// + /// The command line arguments public static void Main(string[] args) { string filename = null; diff --git a/src/Lucene.Net.Misc/Index/IndexSplitter.cs b/src/Lucene.Net.Misc/Index/IndexSplitter.cs index 7fadb85000..1d6e409ece 100644 --- a/src/Lucene.Net.Misc/Index/IndexSplitter.cs +++ b/src/Lucene.Net.Misc/Index/IndexSplitter.cs @@ -29,26 +29,27 @@ namespace Lucene.Net.Index /// Command-line tool that enables listing segments in an /// index, copying specific segments to another index, and /// deleting segments from an index. - /// - /// This tool does file-level copying of segments files. + /// + /// + /// This tool does file-level copying of segments files. /// This means it's unable to split apart a single segment /// into multiple segments. For example if your index is a /// single segment, this tool won't help. Also, it does basic /// file-level copying (using simple /// Stream) so it will not work with non - /// FSDirectory Directory impls. - /// + /// FSDirectory Directory impls. + /// /// @lucene.experimental You can easily /// accidentally remove segments from your index so be /// careful! - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with three commands that map to that method: index copy-segments, index delete-segments, - /// and index list-segments. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with three commands that map to that method: + /// index copy-segments, index delete-segments, and index list-segments /// public class IndexSplitter { @@ -58,16 +59,16 @@ public class IndexSplitter internal DirectoryInfo dir; - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with three commands that map to this method: index copy-segments, index delete-segments, - /// and index list-segments. + /// provide a .NET tool, + /// lucene-cli, + /// with three commands that map to this method: + /// index copy-segments, index delete-segments, and index list-segments /// - /// + /// The command line arguments public static void Main(string[] args) { if (args.Length < 2) diff --git a/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs b/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs index 0428c86a4a..98c2900866 100644 --- a/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs +++ b/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs @@ -33,19 +33,18 @@ namespace Lucene.Net.Index /// here uses where the input data /// comes from the input index with artificially applied deletes to the document /// id-s that fall outside the selected partition. - /// Note 1: Deletes are only applied to a buffered list of deleted docs and + /// + /// Note 1: Deletes are only applied to a buffered list of deleted docs and /// don't affect the source index - this tool works also with read-only indexes. - /// - /// Note 2: the disadvantage of this tool is that source index needs to be + /// + /// Note 2: the disadvantage of this tool is that source index needs to be /// read as many times as there are parts to be created, hence the name of this /// tool. - /// - /// - /// NOTE: this tool is unaware of documents added - /// atomically via or + /// + /// NOTE: this tool is unaware of documents added + /// atomically via or /// , which means it can easily /// break up such document groups. - /// /// public class MultiPassIndexSplitter { @@ -122,11 +121,13 @@ public virtual void Split(LuceneVersion version, IndexReader @in, Store.Director /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: index split. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// index split /// /// /// diff --git a/src/Lucene.Net.Misc/Misc/GetTermInfo.cs b/src/Lucene.Net.Misc/Misc/GetTermInfo.cs index 39257ea9fb..1e5710ebf2 100644 --- a/src/Lucene.Net.Misc/Misc/GetTermInfo.cs +++ b/src/Lucene.Net.Misc/Misc/GetTermInfo.cs @@ -25,26 +25,29 @@ namespace Lucene.Net.Misc /// /// Utility to get document frequency and total number of occurrences (sum of the tf for each doc) of a term. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: index list-term-info. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// index list-term-info /// public static class GetTermInfo // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: index list-term-info. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// index list-term-info /// - /// - /// + /// The command line arguments + /// Thrown if the incorrect number of arguments are provided public static void Main(string[] args) { diff --git a/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs b/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs index d228053d98..990f459dda 100644 --- a/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs +++ b/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs @@ -35,26 +35,28 @@ namespace Lucene.Net.Misc /// class extracts the top n most frequent terms /// (by document frequency) from an existing Lucene index and reports their /// document frequency. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: index list-high-freq-terms. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// index list-high-freq-terms /// public static class HighFreqTerms // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { // The top numTerms will be displayed public const int DEFAULT_NUMTERMS = 100; - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: index list-high-freq-terms. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// index list-high-freq-terms /// /// /// @@ -180,7 +182,7 @@ public int Compare(TermStats a, TermStats b) } /// - /// Compares terms by + /// Compares terms by /// public sealed class TotalTermFreqComparer : IComparer { @@ -205,14 +207,14 @@ public int Compare(TermStats a, TermStats b) /// /// Priority queue for objects - /// + /// /// internal sealed class TermStatsQueue : PriorityQueue { internal readonly IComparer comparer; #nullable enable - internal TermStatsQueue(int size, IComparer comparer) + internal TermStatsQueue(int size, IComparer comparer) : base(size) { this.comparer = comparer ?? throw new ArgumentNullException(nameof(comparer)); // LUCENENET: Added null guard clause diff --git a/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs b/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs index 9801c21663..2208599e62 100644 --- a/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs +++ b/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs @@ -26,26 +26,29 @@ namespace Lucene.Net.Misc /// /// Merges indices specified on the command line into the index /// specified as the first command line argument. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: index merge. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// index merge /// public static class IndexMergeTool // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: index merge. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// index merge /// - /// - /// + /// The command line arguments + /// Thrown if the incorrect number of arguments are provided public static void Main(string[] args) { if (args.Length < 3) diff --git a/src/Lucene.Net/Index/CheckIndex.cs b/src/Lucene.Net/Index/CheckIndex.cs index a6000b104c..31084de387 100644 --- a/src/Lucene.Net/Index/CheckIndex.cs +++ b/src/Lucene.Net/Index/CheckIndex.cs @@ -107,7 +107,7 @@ internal Status() /// /// Empty unless you passed specific segments list to check as optional 3rd argument. /// - public IList SegmentsChecked { get; internal set; } // LUCENENET specific - made setter internal + public IList SegmentsChecked { get; internal set; } // LUCENENET specific - made setter internal /// /// True if the index was created with a newer version of Lucene than the tool. @@ -137,7 +137,7 @@ internal Status() public int NumBadSegments { get; internal set; } // LUCENENET specific - made setter internal /// - /// True if we checked only specific segments + /// True if we checked only specific segments /// ( was called with non-null /// argument). /// @@ -519,13 +519,13 @@ public virtual Status DoCheckIndex(IList onlySegments) { Msg(infoStream, "ERROR: could not read any segments file in directory"); result.MissingSegments = true; - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(t.ToString()); //infoStream.WriteLine(t.StackTrace); - + return result; } @@ -567,13 +567,13 @@ public virtual Status DoCheckIndex(IList onlySegments) catch (Exception t) when (t.IsThrowable()) { Msg(infoStream, "ERROR: could not open segments file in directory"); - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(t.ToString()); //infoStream.WriteLine(t.StackTrace); - + result.CantOpenSegments = true; return result; } @@ -585,13 +585,13 @@ public virtual Status DoCheckIndex(IList onlySegments) catch (Exception t) when (t.IsThrowable()) { Msg(infoStream, "ERROR: could not read segment file version in directory"); - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(t.ToString()); //infoStream.WriteLine(t.StackTrace); - + result.MissingSegmentVersion = true; return result; } @@ -745,12 +745,12 @@ public virtual Status DoCheckIndex(IList onlySegments) segInfoStat.OpenReaderPassed = true; infoStream?.Write(" test: check integrity....."); - + reader.CheckIntegrity(); Msg(infoStream, "OK"); infoStream?.Write(" test: check live docs....."); - + int numDocs = reader.NumDocs; toLoseDocCount = numDocs; if (reader.HasDeletions) @@ -818,7 +818,7 @@ public virtual Status DoCheckIndex(IList onlySegments) // Test getFieldInfos() infoStream?.Write(" test: fields.............."); - + FieldInfos fieldInfos = reader.FieldInfos; Msg(infoStream, "OK [" + fieldInfos.Count + " fields]"); segInfoStat.NumFields = fieldInfos.Count; @@ -873,7 +873,7 @@ public virtual Status DoCheckIndex(IList onlySegments) // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(t.ToString()); - + Msg(infoStream, ""); result.TotLoseDocCount += toLoseDocCount; result.NumBadSegments++; @@ -954,12 +954,12 @@ public static Status.FieldNormStatus TestFieldNorms(AtomicReader reader, TextWri { Msg(infoStream, "ERROR [" + e.Message + "]"); status.Error = e; - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(e.ToString()); - //infoStream.WriteLine(e.StackTrace); + //infoStream.WriteLine(e.StackTrace); } return status; @@ -1645,7 +1645,7 @@ public static Status.TermIndexStatus TestPostings(AtomicReader reader, TextWrite try { infoStream?.Write(" test: terms, freq, prox..."); - + Fields fields = reader.Fields; FieldInfos fieldInfos = reader.FieldInfos; status = CheckFields(fields, liveDocs, maxDoc, fieldInfos, true, false, infoStream, verbose); @@ -1660,12 +1660,12 @@ public static Status.TermIndexStatus TestPostings(AtomicReader reader, TextWrite Msg(infoStream, "ERROR: " + e); status = new Status.TermIndexStatus(); status.Error = e; - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(e.ToString()); - //infoStream.WriteLine(e.StackTrace); + //infoStream.WriteLine(e.StackTrace); } return status; @@ -1710,12 +1710,12 @@ public static Status.StoredFieldStatus TestStoredFields(AtomicReader reader, Tex { Msg(infoStream, "ERROR [" + e.Message + "]"); status.Error = e; - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(e.ToString()); - //infoStream.WriteLine(e.StackTrace); + //infoStream.WriteLine(e.StackTrace); } return status; @@ -1732,7 +1732,7 @@ public static Status.DocValuesStatus TestDocValues(AtomicReader reader, TextWrit try { infoStream?.Write(" test: docvalues..........."); - + foreach (FieldInfo fieldInfo in reader.FieldInfos) { if (fieldInfo.HasDocValues) @@ -1755,12 +1755,12 @@ public static Status.DocValuesStatus TestDocValues(AtomicReader reader, TextWrit { Msg(infoStream, "ERROR [" + e.Message + "]"); status.Error = e; - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. infoStream?.WriteLine(e.ToString()); - //infoStream.WriteLine(e.StackTrace); + //infoStream.WriteLine(e.StackTrace); } return status; } @@ -2278,7 +2278,7 @@ public static Status.TermVectorStatus TestTermVectors(AtomicReader reader, TextW { Msg(infoStream, "ERROR [" + e.Message + "]"); status.Error = e; - + // LUCENENET NOTE: Some tests rely on the error type being in // the message. We can't get the error type with StackTrace, we // need ToString() for that. @@ -2366,14 +2366,16 @@ public virtual void FixIndex(Status result) /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: index check. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// index check /// - /// - /// + /// The command line arguments + /// Thrown if invalid arguments are provided [STAThread] public static void Main(string[] args) { diff --git a/src/Lucene.Net/Index/IndexUpgrader.cs b/src/Lucene.Net/Index/IndexUpgrader.cs index 7f1477546c..731369ed72 100644 --- a/src/Lucene.Net/Index/IndexUpgrader.cs +++ b/src/Lucene.Net/Index/IndexUpgrader.cs @@ -37,23 +37,25 @@ namespace Lucene.Net.Index /// /// This is an easy-to-use tool that upgrades all segments of an index from previous Lucene versions /// to the current segment file format. It can be used from command line. - /// - /// LUCENENET specific: In the Java implementation this class' Main - /// method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: index upgrade. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// index upgrade + /// /// Alternatively this class can be instantiated and invoked. It uses /// and triggers the upgrade via an request to . - /// + /// /// This tool keeps only the last commit in an index; for this /// reason, if the incoming index has more than one commit, the tool /// refuses to run by default. Specify -delete-prior-commits /// to override this, allowing the tool to delete all but the last commit. /// From .NET code this can be enabled by passing true to /// . - /// + /// /// Warning: this tool may reorder documents if the index was partially /// upgraded before execution (e.g., documents were added). If your application relies /// on "monotonicity" of doc IDs (which means that the order in which the documents @@ -82,16 +84,17 @@ private static void PrintUsage() /// /// Main method to run from the /// command-line. - /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: index upgrade. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// index upgrade /// - /// - /// + /// The command line arguments + /// Thrown if any incorrect arguments are provided public static void Main(string[] args) { ParseArgs(args).Upgrade(); diff --git a/src/Lucene.Net/Store/LockStressTest.cs b/src/Lucene.Net/Store/LockStressTest.cs index 8a9a9c5521..dc0b218e5c 100644 --- a/src/Lucene.Net/Store/LockStressTest.cs +++ b/src/Lucene.Net/Store/LockStressTest.cs @@ -26,19 +26,17 @@ namespace Lucene.Net.Store * limitations under the License. */ - // LUCENENET: Not used - /////Run without any args to see usage. - /// /// Simple standalone tool that forever acquires & releases a /// lock using a specific . - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: lock stress-test. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// lock stress-test /// /// /// @@ -46,14 +44,16 @@ public static class LockStressTest // LUCENENET specific: CA1052 Static holder t { /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: lock stress-test. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// lock stress-test /// - /// - /// + /// The command line arguments + /// Thrown if the incorrect number of arguments are provided [STAThread] [SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression", Justification = "This is a SonarCloud issue")] [SuppressMessage("Security Hotspot", "S2245:Using pseudorandom number generators (PRNGs) is security-sensitive", Justification = "The Random class is only used to generate a timeout value")] @@ -63,20 +63,20 @@ public static void Main(string[] args) { // LUCENENET specific - our lucene-cli wrapper console shows the correct usage throw new ArgumentException(); - //Console.WriteLine("Usage: java Lucene.Net.Store.LockStressTest myID verifierHost verifierPort lockFactoryClassName lockDirName sleepTimeMS count\n" + - // "\n" + - // " myID = int from 0 .. 255 (should be unique for test process)\n" + - // " verifierHost = hostname that LockVerifyServer is listening on\n" + - // " verifierPort = port that LockVerifyServer is listening on\n" + - // " lockFactoryClassName = primary LockFactory class that we will use\n" + - // " lockDirName = path to the lock directory (only set for Simple/NativeFSLockFactory\n" + - // " sleepTimeMS = milliseconds to pause betweeen each lock obtain/release\n" + - // " count = number of locking tries\n" + - // "\n" + - // "You should run multiple instances of this process, each with its own\n" + - // "unique ID, and each pointing to the same lock directory, to verify\n" + - // "that locking is working correctly.\n" + - // "\n" + + //Console.WriteLine("Usage: java Lucene.Net.Store.LockStressTest myID verifierHost verifierPort lockFactoryClassName lockDirName sleepTimeMS count\n" + + // "\n" + + // " myID = int from 0 .. 255 (should be unique for test process)\n" + + // " verifierHost = hostname that LockVerifyServer is listening on\n" + + // " verifierPort = port that LockVerifyServer is listening on\n" + + // " lockFactoryClassName = primary LockFactory class that we will use\n" + + // " lockDirName = path to the lock directory (only set for Simple/NativeFSLockFactory\n" + + // " sleepTimeMS = milliseconds to pause betweeen each lock obtain/release\n" + + // " count = number of locking tries\n" + + // "\n" + + // "You should run multiple instances of this process, each with its own\n" + + // "unique ID, and each pointing to the same lock directory, to verify\n" + + // "that locking is working correctly.\n" + + // "\n" + // "Make sure you are first running LockVerifyServer."); //Environment.FailFast("1"); } diff --git a/src/Lucene.Net/Store/LockVerifyServer.cs b/src/Lucene.Net/Store/LockVerifyServer.cs index 2aa64bb235..5da9d58bb8 100644 --- a/src/Lucene.Net/Store/LockVerifyServer.cs +++ b/src/Lucene.Net/Store/LockVerifyServer.cs @@ -30,20 +30,18 @@ namespace Lucene.Net.Store using IOUtils = Lucene.Net.Util.IOUtils; - // LUCENENET: Not used - ///// Run without any args to see usage. - /// /// Simple standalone server that must be running when you /// use . This server simply /// verifies at most one process holds the lock at a time. - /// - /// LUCENENET specific: This class is not for direct use. In the Java implementation - /// it's Main method was intended to be called from the command line. However in .NET a + /// + /// LUCENENET specific: In the Java implementation, this class' Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to that method: lock verify-server. - /// + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to that method: + /// lock verify-server /// /// /// @@ -51,14 +49,16 @@ public static class LockVerifyServer // LUCENENET specific: CA1052 Static holder { /// - /// LUCENENET specific: This method is not for direct use. In the Java implementation - /// it was intended to be called from the command line. However in .NET a + /// LUCENENET specific: In the Java implementation, this Main method + /// was intended to be called from the command line. However, in .NET a /// method within a DLL can't be directly called from the command line so we - /// provide a lucene-cli - /// with a command that maps to this method: lock verify-server. + /// provide a .NET tool, + /// lucene-cli, + /// with a command that maps to this method: + /// lock verify-server /// - /// - /// + /// The command line arguments + /// Thrown if the incorrect number of arguments are provided [STAThread] public static void Main(string[] args) {