diff --git a/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs b/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs index 83fd993eec..6c286077ad 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs @@ -20,6 +20,13 @@ namespace Lucene.Net.Analysis.Ja.Util * limitations under the License. */ + /// + /// 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 kuromoji-build-dictionary. + /// public static class DictionaryBuilder // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { public enum DictionaryFormat { IPADIC, UNIDIC }; @@ -62,6 +69,13 @@ ConnectionCostsWriter connectionCosts Console.WriteLine("done"); } + /// + /// 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 kuromoji-build-dictionary. + /// public static void Main(string[] args) { DictionaryFormat format; diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs index a42b1f5381..a1900ab4b0 100644 --- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs +++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs @@ -66,6 +66,13 @@ 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 + /// 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 + /// /// public static class Compile // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable { @@ -74,6 +81,13 @@ 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 diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs index 9a48e1c9df..1cbca9e6e3 100644 --- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs +++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs @@ -65,6 +65,13 @@ 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. /// @@ -82,6 +89,13 @@ 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 diff --git a/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs b/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs index 6b0b7a904c..062f0a0554 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Benchmark.cs @@ -97,6 +97,13 @@ 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. /// /// Benchmark config and algorithm files. diff --git a/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs b/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs index 7f0078fc40..4adbb11df2 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs @@ -24,9 +24,25 @@ 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 + /// 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. + /// /// 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 + /// 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. + /// + /// [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 ca045a42e7..7aa63d3f5f 100644 --- a/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs +++ b/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs @@ -31,9 +31,26 @@ 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 + /// 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. + /// /// 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 + /// 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. + /// + /// Must contain 4 or 5 values + /// 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 1592d17346..3cccd41b15 100644 --- a/src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs +++ b/src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs @@ -27,6 +27,13 @@ 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 + /// 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. + /// /// public class QualityQueriesFinder { @@ -43,7 +50,11 @@ 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 + /// 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. /// /// {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 b34c36cbaa..ffbade0356 100644 --- a/src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs +++ b/src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs @@ -132,6 +132,14 @@ 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 + /// 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. + /// + /// 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 e81f6cf942..2e09ad8c23 100644 --- a/src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs +++ b/src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs @@ -118,6 +118,14 @@ public virtual void Extract() Console.WriteLine("Extraction took " + (finish - start) + " ms"); } + /// + /// 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 extract-wikipedia. + /// + /// 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 e8ac0b1541..cb0e4fb665 100644 --- a/src/Lucene.Net.Demo/Facet/AssociationsFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/AssociationsFacetsExample.cs @@ -157,7 +157,17 @@ public FacetResult RunDrillDown() } - /// Runs the sum int/float associations examples and prints the results. + /// + /// 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 [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 4a8d7f851a..68a52950e6 100644 --- a/src/Lucene.Net.Demo/Facet/DistanceFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/DistanceFacetsExample.cs @@ -263,7 +263,16 @@ public void Dispose() indexDir?.Dispose(); } - /// Runs the search and drill-down examples and prints the results. + /// + /// 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. + /// + /// 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 514dfc26f7..3a4dc95482 100644 --- a/src/Lucene.Net.Demo/Facet/ExpressionAggregationFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/ExpressionAggregationFacetsExample.cs @@ -115,7 +115,17 @@ public FacetResult RunSearch() return Search(); } - /// Runs the search and drill-down examples and prints the results. + /// + /// 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 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 656d5570d0..5e3e71b232 100644 --- a/src/Lucene.Net.Demo/Facet/MultiCategoryListsFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/MultiCategoryListsFacetsExample.cs @@ -134,7 +134,17 @@ public IList RunSearch() return Search(); } - /// Runs the search example and prints the results. + /// + /// 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 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 a5c1d263d6..5352f9a693 100644 --- a/src/Lucene.Net.Demo/Facet/RangeFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/RangeFacetsExample.cs @@ -125,7 +125,17 @@ public void Dispose() indexDir?.Dispose(); } - /// Runs the search and drill-down examples and prints the results. + /// + /// 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 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 9f591e3e36..6b64ea7f6d 100644 --- a/src/Lucene.Net.Demo/Facet/SimpleFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/SimpleFacetsExample.cs @@ -233,7 +233,17 @@ public IList RunDrillSideways() return DrillSideways(); } - /// Runs the search and drill-down examples and prints the results. + /// + /// 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 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 b787015378..557dc80ee0 100644 --- a/src/Lucene.Net.Demo/Facet/SimpleSortedSetFacetsExample.cs +++ b/src/Lucene.Net.Demo/Facet/SimpleSortedSetFacetsExample.cs @@ -151,7 +151,17 @@ public FacetResult RunDrillDown() return DrillDown(); } - /// Runs the search and drill-down examples and prints the results. + /// 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 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 efae0eb4bd..e9dc565f72 100644 --- a/src/Lucene.Net.Demo/IndexFiles.cs +++ b/src/Lucene.Net.Demo/IndexFiles.cs @@ -31,15 +31,35 @@ 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. - /// Run it with no command-line arguments for usage information. + /// + /// 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. + /// + /// 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. + /// + /// + /// public static void Main(string[] args) { // The should be the assembly name of the application diff --git a/src/Lucene.Net.Demo/SearchFiles.cs b/src/Lucene.Net.Demo/SearchFiles.cs index a8267af1a3..8953ffaaf0 100644 --- a/src/Lucene.Net.Demo/SearchFiles.cs +++ b/src/Lucene.Net.Demo/SearchFiles.cs @@ -37,10 +37,27 @@ 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. + /// + /// 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. + /// + /// + /// public static void Main(string[] args) { // The should be the assembly name of the application diff --git a/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs b/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs index c0bed26c55..ee8bed8058 100644 --- a/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs +++ b/src/Lucene.Net.Misc/Index/CompoundFileExtractor.cs @@ -25,15 +25,34 @@ 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 + /// 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. + /// /// 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. - ///// Usage: org.apache.lucene.index.IndexReader [-extract] <cfsfile> + /// 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 + /// 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. + /// + /// + /// public static void Main(string[] args) { string filename = null; @@ -151,4 +170,4 @@ public static void Main(string[] args) } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Misc/Index/IndexSplitter.cs b/src/Lucene.Net.Misc/Index/IndexSplitter.cs index 3d02492400..7fadb85000 100644 --- a/src/Lucene.Net.Misc/Index/IndexSplitter.cs +++ b/src/Lucene.Net.Misc/Index/IndexSplitter.cs @@ -41,6 +41,14 @@ namespace Lucene.Net.Index /// @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 + /// 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. + /// /// public class IndexSplitter { @@ -50,6 +58,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 + /// 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. + /// + /// public static void Main(string[] args) { if (args.Length < 2) @@ -179,4 +197,4 @@ private static void CopyFile(FileInfo src, FileInfo dst) @in.CopyTo(@out); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs b/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs index 30fe0d7ea1..0428c86a4a 100644 --- a/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs +++ b/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs @@ -120,6 +120,16 @@ public virtual void Split(LuceneVersion version, IndexReader @in, Store.Director Console.Error.WriteLine("Done."); } + + /// + /// 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: index split. + /// + /// + /// public static void Main(string[] args) { if (args.Length < 5) @@ -318,4 +328,4 @@ public void DeleteDocument(int n) public override IBits LiveDocs => liveDocs; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Misc/Misc/GetTermInfo.cs b/src/Lucene.Net.Misc/Misc/GetTermInfo.cs index fb7fd1e84e..39257ea9fb 100644 --- a/src/Lucene.Net.Misc/Misc/GetTermInfo.cs +++ b/src/Lucene.Net.Misc/Misc/GetTermInfo.cs @@ -24,10 +24,27 @@ namespace Lucene.Net.Misc */ /// - /// Utility to get document frequency and total number of occurrences (sum of the tf for each doc) of a term. + /// 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 + /// 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. + /// /// 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 + /// 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. + /// + /// + /// public static void Main(string[] args) { @@ -64,4 +81,4 @@ public static void TermInfo(Store.Directory dir, Term term) // Console.WriteLine("\n\nusage:\n\t" + "java " + typeof(GetTermInfo).FullName + " field term \n\n"); //} } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs b/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs index fc4f82a222..d228053d98 100644 --- a/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs +++ b/src/Lucene.Net.Misc/Misc/HighFreqTerms.cs @@ -27,14 +27,20 @@ namespace Lucene.Net.Misc * limitations under the License. */ + // LUCENENET: Not used + // If the -t flag is given, both document frequency and total tf (total + // number of occurrences) are reported, ordered by descending total tf. + /// /// class extracts the top n most frequent terms /// (by document frequency) from an existing Lucene index and reports their /// document frequency. /// - /// If the -t flag is given, both document frequency and total tf (total - /// number of occurrences) are reported, ordered by descending total tf. - /// + /// 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: index list-high-freq-terms. /// /// public static class HighFreqTerms // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable @@ -42,6 +48,16 @@ public static class HighFreqTerms // LUCENENET specific: CA1052 Static holder ty // 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 + /// 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. + /// + /// + /// public static void Main(string[] args) { string field = null; @@ -81,7 +97,7 @@ public static void Main(string[] args) } } - // LUCENENET specific - our wrapper console shows the correct usage + // LUCENENET specific - The lucene-cli docs show the correct usage //private static void Usage() //{ // Console.WriteLine("\n\n" + "java org.apache.lucene.misc.HighFreqTerms [-t] [number_terms] [field]\n\t -t: order by totalTermFreq\n\n"); diff --git a/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs b/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs index defd30841e..9801c21663 100644 --- a/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs +++ b/src/Lucene.Net.Misc/Misc/IndexMergeTool.cs @@ -26,9 +26,26 @@ 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 + /// 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. + /// /// 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 + /// 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. + /// + /// + /// public static void Main(string[] args) { if (args.Length < 3) @@ -68,4 +85,4 @@ public static void Main(string[] args) Console.WriteLine("Done."); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/CheckIndex.cs b/src/Lucene.Net/Index/CheckIndex.cs index 68c15734a7..a6000b104c 100644 --- a/src/Lucene.Net/Index/CheckIndex.cs +++ b/src/Lucene.Net/Index/CheckIndex.cs @@ -2363,6 +2363,17 @@ public virtual void FixIndex(Status result) /////

///// this tool exits with exit code 1 if the index cannot be opened or has any ///// corruption, else 0. + + + ///

+ /// 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: index check. + /// + /// + /// [STAThread] public static void Main(string[] args) { @@ -2524,4 +2535,4 @@ public static void Main(string[] args) Environment.Exit(exitCode); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Index/IndexUpgrader.cs b/src/Lucene.Net/Index/IndexUpgrader.cs index 841c312d23..7f1477546c 100644 --- a/src/Lucene.Net/Index/IndexUpgrader.cs +++ b/src/Lucene.Net/Index/IndexUpgrader.cs @@ -1,4 +1,4 @@ -using Lucene.Net.Util; +using Lucene.Net.Util; using System; using System.Collections.Generic; using System.IO; @@ -29,12 +29,21 @@ namespace Lucene.Net.Index using FSDirectory = Lucene.Net.Store.FSDirectory; using InfoStream = Lucene.Net.Util.InfoStream; + // LUCENENET: Not used + ///// + ///// java -cp lucene-core.jar Lucene.Net.Index.IndexUpgrader [-delete-prior-commits] [-verbose] indexDir + ///// + /// /// 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: - /// - /// java -cp lucene-core.jar Lucene.Net.Index.IndexUpgrader [-delete-prior-commits] [-verbose] indexDir - /// + /// 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 + /// 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. + /// /// Alternatively this class can be instantiated and invoked. It uses /// and triggers the upgrade via an request to . /// @@ -73,7 +82,16 @@ 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 + /// 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. + /// /// + /// + /// public static void Main(string[] args) { ParseArgs(args).Upgrade(); @@ -218,4 +236,4 @@ public void Upgrade() } } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/LockStressTest.cs b/src/Lucene.Net/Store/LockStressTest.cs index b5dc516c4f..8a9a9c5521 100644 --- a/src/Lucene.Net/Store/LockStressTest.cs +++ b/src/Lucene.Net/Store/LockStressTest.cs @@ -26,15 +26,34 @@ 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 . Run without any args - /// to see usage. + /// 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 + /// 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. + /// /// /// /// public static class LockStressTest // 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 + /// 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. + /// + /// + /// [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")] @@ -172,4 +191,4 @@ public static void Main(string[] args) Console.WriteLine("Finished " + count + " tries."); } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net/Store/LockVerifyServer.cs b/src/Lucene.Net/Store/LockVerifyServer.cs index 203afa121d..2aa64bb235 100644 --- a/src/Lucene.Net/Store/LockVerifyServer.cs +++ b/src/Lucene.Net/Store/LockVerifyServer.cs @@ -30,16 +30,35 @@ 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. - /// Run without any args to see usage. + /// + /// 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: lock verify-server. + /// /// /// /// public static class LockVerifyServer // 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 + /// 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. + /// + /// + /// [STAThread] public static void Main(string[] args) { @@ -194,4 +213,4 @@ public override void Run() } } } -} \ No newline at end of file +}