This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 33df628af23719ee87e1fb3d9a6b9fcd86c9b007 Author: Shad Storhaug <[email protected]> AuthorDate: Sat Jul 6 22:19:55 2019 +0700 Made lucene-cli into a dotnet tool and updated the documentation on how to install and use it --- .../Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj | 2 +- .../docs/analysis/kuromoji-build-dictionary.md | 4 ++-- .../lucene-cli/docs/analysis/stempel-compile-stems.md | 4 ++-- .../lucene-cli/docs/analysis/stempel-patch-stems.md | 4 ++-- .../tools/lucene-cli/docs/benchmark/extract-reuters.md | 4 ++-- .../tools/lucene-cli/docs/benchmark/extract-wikipedia.md | 4 ++-- .../lucene-cli/docs/benchmark/find-quality-queries.md | 4 ++-- .../tools/lucene-cli/docs/benchmark/run-trec-eval.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/benchmark/run.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/benchmark/sample.md | 4 ++-- .../tools/lucene-cli/docs/demo/associations-facets.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/demo/distance-facets.md | 4 ++-- .../docs/demo/expression-aggregation-facets.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/demo/index-files.md | 6 +++--- .../lucene-cli/docs/demo/multi-category-lists-facets.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/demo/range-facets.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/demo/search-files.md | 8 ++++---- src/dotnet/tools/lucene-cli/docs/demo/simple-facets.md | 4 ++-- .../lucene-cli/docs/demo/simple-sorted-set-facets.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/index.md | 16 +++++++++++----- src/dotnet/tools/lucene-cli/docs/index/check.md | 6 +++--- src/dotnet/tools/lucene-cli/docs/index/copy-segments.md | 4 ++-- .../tools/lucene-cli/docs/index/delete-segments.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/index/extract-cfs.md | 6 +++--- src/dotnet/tools/lucene-cli/docs/index/fix.md | 6 +++--- src/dotnet/tools/lucene-cli/docs/index/list-cfs.md | 4 ++-- .../tools/lucene-cli/docs/index/list-high-freq-terms.md | 6 +++--- src/dotnet/tools/lucene-cli/docs/index/list-segments.md | 4 ++-- .../tools/lucene-cli/docs/index/list-taxonomy-stats.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/index/list-term-info.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/index/merge.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/index/split.md | 6 +++--- src/dotnet/tools/lucene-cli/docs/index/upgrade.md | 6 +++--- src/dotnet/tools/lucene-cli/docs/lock/stress-test.md | 4 ++-- src/dotnet/tools/lucene-cli/docs/lock/verify-server.md | 4 ++-- src/dotnet/tools/lucene-cli/lucene-cli.csproj | 7 ++++++- 36 files changed, 93 insertions(+), 82 deletions(-) diff --git a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj index f1d4d83..48e3774 100644 --- a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj +++ b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj @@ -24,7 +24,7 @@ <Import Project="$(SolutionDir)Version.proj" /> <PropertyGroup> - <TargetFramework>netcoreapp2.0</TargetFramework> + <TargetFramework>netcoreapp2.1</TargetFramework> <AssemblyTitle>Lucene.Net.Tests.Cli</AssemblyTitle> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> diff --git a/src/dotnet/tools/lucene-cli/docs/analysis/kuromoji-build-dictionary.md b/src/dotnet/tools/lucene-cli/docs/analysis/kuromoji-build-dictionary.md index d74b53c..eab6996 100644 --- a/src/dotnet/tools/lucene-cli/docs/analysis/kuromoji-build-dictionary.md +++ b/src/dotnet/tools/lucene-cli/docs/analysis/kuromoji-build-dictionary.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll analysis kuromoji-build-dictionary <FORMAT> <INPUT_DIRECTORY> <OUTPUT_DIRECTORY> [-e|--encoding] [-n|--normalize] [?|-h|--help]</code> +<code>lucene analysis kuromoji-build-dictionary <FORMAT> <INPUT_DIRECTORY> <OUTPUT_DIRECTORY> [-e|--encoding] [-n|--normalize] [?|-h|--help]</code> ### Description @@ -56,5 +56,5 @@ Normalize the entries using normalization form KC. ### Example -<code>dotnet lucene-cli.dll analysis kuromoji-build-dictionary X:\kuromoji-data X:\kuromoji-dictionary --normalize</code> +<code>lucene analysis kuromoji-build-dictionary X:\kuromoji-data X:\kuromoji-dictionary --normalize</code> diff --git a/src/dotnet/tools/lucene-cli/docs/analysis/stempel-compile-stems.md b/src/dotnet/tools/lucene-cli/docs/analysis/stempel-compile-stems.md index 6aae62c..088daa3 100644 --- a/src/dotnet/tools/lucene-cli/docs/analysis/stempel-compile-stems.md +++ b/src/dotnet/tools/lucene-cli/docs/analysis/stempel-compile-stems.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll analysis stempel-compile-stems <STEMMING_ALGORITHM> <STEMMER_TABLE_FILE> [-e|--encoding] [?|-h|--help]</code> +<code>lucene analysis stempel-compile-stems <STEMMING_ALGORITHM> <STEMMER_TABLE_FILE> [-e|--encoding] [?|-h|--help]</code> ### Description @@ -34,4 +34,4 @@ The file encoding used by the stemmer files. If not supplied, the default value ### Example -<code>dotnet lucene-cli.dll analysis stempel-compile-stems test X:\stemmer-data\table1.txt X:\stemmer-data\table2.txt</code> +<code>lucene analysis stempel-compile-stems test X:\stemmer-data\table1.txt X:\stemmer-data\table2.txt</code> diff --git a/src/dotnet/tools/lucene-cli/docs/analysis/stempel-patch-stems.md b/src/dotnet/tools/lucene-cli/docs/analysis/stempel-patch-stems.md index 9b4ce4a..42a9634 100644 --- a/src/dotnet/tools/lucene-cli/docs/analysis/stempel-patch-stems.md +++ b/src/dotnet/tools/lucene-cli/docs/analysis/stempel-patch-stems.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll analysis stempel-patch-stems <STEMMER_TABLE_FILE> [-e|--encoding] [?|-h|--help]</code> +<code>lucene analysis stempel-patch-stems <STEMMER_TABLE_FILE> [-e|--encoding] [?|-h|--help]</code> ### Description @@ -30,5 +30,5 @@ The file encoding used by the stemmer files. If not supplied, the default value ### Example -<code>dotnet lucene-cli.dll analysis stempel-patch-stems X:\stemmer-data\table1.txt X:\stemmer-data\table2.txt --encoding UTF-16</code> +<code>lucene analysis stempel-patch-stems X:\stemmer-data\table1.txt X:\stemmer-data\table2.txt --encoding UTF-16</code> diff --git a/src/dotnet/tools/lucene-cli/docs/benchmark/extract-reuters.md b/src/dotnet/tools/lucene-cli/docs/benchmark/extract-reuters.md index d63b2d3..26b16dd 100644 --- a/src/dotnet/tools/lucene-cli/docs/benchmark/extract-reuters.md +++ b/src/dotnet/tools/lucene-cli/docs/benchmark/extract-reuters.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll benchmark extract-reuters [?|-h|--help]</code> +<code>lucene benchmark extract-reuters [?|-h|--help]</code> ### Arguments @@ -28,4 +28,4 @@ Prints out a short help for the command. Extracts the reuters SGML files in the `z:\input` directory and places the content in the `z:\output` directory. -<code>dotnet lucene-cli.dll benchmark extract-reuters z:\input z:\output</code> +<code>lucene benchmark extract-reuters z:\input z:\output</code> diff --git a/src/dotnet/tools/lucene-cli/docs/benchmark/extract-wikipedia.md b/src/dotnet/tools/lucene-cli/docs/benchmark/extract-wikipedia.md index 1d48911..60d0574 100644 --- a/src/dotnet/tools/lucene-cli/docs/benchmark/extract-wikipedia.md +++ b/src/dotnet/tools/lucene-cli/docs/benchmark/extract-wikipedia.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll benchmark extract-wikipedia [?|-h|--help]</code> +<code>lucene benchmark extract-wikipedia [?|-h|--help]</code> ### Arguments @@ -32,4 +32,4 @@ Tells the extractor to skip WIKI docs that contain only images. Extracts the `c:\wiki.xml` file into the `c:\out` directory, skipping any docs that only contain images. -<code>dotnet lucene-cli.dll benchmark extract-wikipedia c:\wiki.xml c:\out -d</code> +<code>lucene benchmark extract-wikipedia c:\wiki.xml c:\out -d</code> diff --git a/src/dotnet/tools/lucene-cli/docs/benchmark/find-quality-queries.md b/src/dotnet/tools/lucene-cli/docs/benchmark/find-quality-queries.md index c4e615b..237f1b8 100644 --- a/src/dotnet/tools/lucene-cli/docs/benchmark/find-quality-queries.md +++ b/src/dotnet/tools/lucene-cli/docs/benchmark/find-quality-queries.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll benchmark find-quality-queries [?|-h|--help]</code> +<code>lucene benchmark find-quality-queries [?|-h|--help]</code> ### Arguments @@ -24,4 +24,4 @@ Prints out a short help for the command. Finds quality queries on the `c:\lucene-index` index directory. -<code>dotnet lucene-cli.dll benchmark find-quality-queries c:\lucene-index</code> +<code>lucene benchmark find-quality-queries c:\lucene-index</code> diff --git a/src/dotnet/tools/lucene-cli/docs/benchmark/run-trec-eval.md b/src/dotnet/tools/lucene-cli/docs/benchmark/run-trec-eval.md index 5d5960b..9681356 100644 --- a/src/dotnet/tools/lucene-cli/docs/benchmark/run-trec-eval.md +++ b/src/dotnet/tools/lucene-cli/docs/benchmark/run-trec-eval.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll benchmark run-trec-eval [?|-h|--help]</code> +<code>lucene benchmark run-trec-eval [?|-h|--help]</code> ### Arguments @@ -48,4 +48,4 @@ Use narrative field in query. Runs a TREC evaluation on the `c:\topics` queries file and the `c:\queries` relevance judgements on the `c:\lucene-index` index using the description and narrative fields and places the output in `c:\output.txt`. -<code>dotnet lucene-cli.dll benchmark run-trec-eval c:\topics.txt c:\queries.txt c:\submissions.txt c:\output.txt c:\lucene-index -d -n</code> +<code>lucene benchmark run-trec-eval c:\topics.txt c:\queries.txt c:\submissions.txt c:\output.txt c:\lucene-index -d -n</code> diff --git a/src/dotnet/tools/lucene-cli/docs/benchmark/run.md b/src/dotnet/tools/lucene-cli/docs/benchmark/run.md index 8042307..b937053 100644 --- a/src/dotnet/tools/lucene-cli/docs/benchmark/run.md +++ b/src/dotnet/tools/lucene-cli/docs/benchmark/run.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll benchmark run [?|-h|--help]</code> +<code>lucene benchmark run [?|-h|--help]</code> ### Arguments @@ -28,4 +28,4 @@ Prints out a short help for the command. Runs a benchmark on the `c:\check.alg` algorithm file. -<code>dotnet lucene-cli.dll benchmark run c:\check.alg</code> +<code>lucene benchmark run c:\check.alg</code> diff --git a/src/dotnet/tools/lucene-cli/docs/benchmark/sample.md b/src/dotnet/tools/lucene-cli/docs/benchmark/sample.md index 7245af5..e715ee4 100644 --- a/src/dotnet/tools/lucene-cli/docs/benchmark/sample.md +++ b/src/dotnet/tools/lucene-cli/docs/benchmark/sample.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll benchmark sample [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene benchmark sample [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -26,4 +26,4 @@ Outputs the source code to the specified directory. Runs the sample. -<code>dotnet lucene-cli.dll benchmark sample</code> +<code>lucene benchmark sample</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/associations-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/associations-facets.md index 77b10fe..1d5f9ce 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/associations-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/associations-facets.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll demo associations-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene demo associations-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -24,4 +24,4 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo associations-facets</code> +<code>lucene demo associations-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/distance-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/distance-facets.md index abfdf3a..4631ea5 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/distance-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/distance-facets.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll demo distance-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene demo distance-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -24,4 +24,4 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo distance-facets</code> +<code>lucene demo distance-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/expression-aggregation-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/expression-aggregation-facets.md index 8633982..8dd0574 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/expression-aggregation-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/expression-aggregation-facets.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll demo expression-aggregation-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene demo expression-aggregation-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -24,4 +24,4 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo expression-aggregation-facets</code> +<code>lucene demo expression-aggregation-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/index-files.md b/src/dotnet/tools/lucene-cli/docs/demo/index-files.md index 10d1806..67bd9d0 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/index-files.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/index-files.md @@ -7,8 +7,8 @@ ### Synopsis ``` -dotnet lucene-cli.dll demo index-files <INDEX_DIRECTORY> <SOURCE_DIRECTORY> [-u|--update] [?|-h|--help] -dotnet lucene-cli.dll demo index-files [-src|--view-source-code] [-out|--output-source-code] +lucene demo index-files <INDEX_DIRECTORY> <SOURCE_DIRECTORY> [-u|--update] [?|-h|--help] +lucene demo index-files [-src|--view-source-code] [-out|--output-source-code] ``` ### Description @@ -47,5 +47,5 @@ Outputs the source code to the specified directory. Indexes the contents of `C:\Users\BGates\Documents\` and places the Lucene.Net index in `X:\test-index\`. -<code>dotnet lucene-cli.dll demo index-files X:\test-index C:\Users\BGates\Documents</code> +<code>lucene demo index-files X:\test-index C:\Users\BGates\Documents</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/multi-category-lists-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/multi-category-lists-facets.md index f486c2a..299df60 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/multi-category-lists-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/multi-category-lists-facets.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll demo multi-category-lists-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene demo multi-category-lists-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -25,4 +25,4 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo multi-category-lists-facets</code> +<code>lucene demo multi-category-lists-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/range-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/range-facets.md index 09e392e..f9b6121 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/range-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/range-facets.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll demo range-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene demo range-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -24,4 +24,4 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo range-facets</code> \ No newline at end of file +<code>lucene demo range-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/search-files.md b/src/dotnet/tools/lucene-cli/docs/demo/search-files.md index 3bbfe38..d1f6622 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/search-files.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/search-files.md @@ -7,8 +7,8 @@ ### Synopsis ``` -dotnet lucene-cli.dll demo search-files <INDEX_DIRECTORY> [-f|--field] [-r|--repeat] [-qf|--queries-file] [-q|--query] [--raw] [-p|--page-size] [?|-h|--help] -dotnet lucene-cli.dll demo search-files [-src|--view-source-code] [-out|--output-source-code] +lucene demo search-files <INDEX_DIRECTORY> [-f|--field] [-r|--repeat] [-qf|--queries-file] [-q|--query] [--raw] [-p|--page-size] [?|-h|--help] +lucene demo search-files [-src|--view-source-code] [-out|--output-source-code] ``` ### Description @@ -65,8 +65,8 @@ Outputs the source code to the specified directory. Search the index located in the `X:\test-index` directory interactively, showing 15 results per page in raw format: -<code>dotnet lucene-cli.dll demo search-files X:\test-index -p 15 --raw</code> +<code>lucene demo search-files X:\test-index -p 15 --raw</code> Run the query "foobar" against the "path" field in the index located in the `X:\test-index` directory: -<code>dotnet lucene-cli.dll demo search-files X:\test-index --field path --query foobar</code> \ No newline at end of file +<code>lucene demo search-files X:\test-index --field path --query foobar</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/simple-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/simple-facets.md index cdb8f30..e93cc78 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/simple-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/simple-facets.md @@ -6,7 +6,7 @@ ### Synopsis -</code>dotnet lucene-cli.dll demo simple-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +</code>lucene demo simple-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -24,4 +24,4 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo simple-facets</code> \ No newline at end of file +<code>lucene demo simple-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/demo/simple-sorted-set-facets.md b/src/dotnet/tools/lucene-cli/docs/demo/simple-sorted-set-facets.md index 09052d9..a92c9b9 100644 --- a/src/dotnet/tools/lucene-cli/docs/demo/simple-sorted-set-facets.md +++ b/src/dotnet/tools/lucene-cli/docs/demo/simple-sorted-set-facets.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll demo simple-sorted-set-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> +<code>lucene demo simple-sorted-set-facets [-src|--view-source-code] [-out|--output-source-code] [?|-h|--help]</code> ### Options @@ -24,6 +24,6 @@ Outputs the source code to the specified directory. ### Example -<code>dotnet lucene-cli.dll demo simple-sorted-set-facets</code> +<code>lucene demo simple-sorted-set-facets</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index.md b/src/dotnet/tools/lucene-cli/docs/index.md index 05e08fa..8dc35f6 100644 --- a/src/dotnet/tools/lucene-cli/docs/index.md +++ b/src/dotnet/tools/lucene-cli/docs/index.md @@ -4,11 +4,17 @@ The Lucene.Net command line interface (CLI) is a new cross-platform toolchain wi ## Prerequisites -- [.NET Core 2.0 Runtime](https://www.microsoft.com/net/download/core#/runtime) +- [.NET Core 2.1 Runtime](https://www.microsoft.com/net/download/core#/runtime) ## Installation -Download the binaries from the [Apache Lucene.Net Distribution](http://www.apache.org/dyn/closer.cgi). Unzip the `lucene-cli.zip` file to a local directory and add that directory to the PATH environment variable of the local system. +Perform a one-time install of the lucene-cli tool using the following dotnet CLI command: + +``` +dotnet tool install -g lucene-cli +``` + +You may then use the lucene-cli tool to analyze and update Lucene.Net indexes and use its demos. ## CLI Commands @@ -21,9 +27,9 @@ The following commands are installed: ## Command structure -CLI command structure consists of the driver ("dotnet lucene-cli.dll"), the command, and possibly command arguments and options. You see this pattern in most CLI operations, such as checking a Lucene.Net index for problematic segments and fixing (removing) them: +CLI command structure consists of the driver ("lucene"), the command, and possibly command arguments and options. You see this pattern in most CLI operations, such as checking a Lucene.Net index for problematic segments and fixing (removing) them: ``` -dotnet lucene-cli.dll index check C:\my-index --verbose -dotnet lucene-cli.dll index fix C:\my-index +lucene index check C:\my-index --verbose +lucene index fix C:\my-index ``` \ No newline at end of file diff --git a/src/dotnet/tools/lucene-cli/docs/index/check.md b/src/dotnet/tools/lucene-cli/docs/index/check.md index caa18b2..45e3f38 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/check.md +++ b/src/dotnet/tools/lucene-cli/docs/index/check.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index check [<INDEX_DIRECTORY>] [-v|--verbose] [-c|--cross-check-term-vectors] [-dir|--directory-type] [-s|--segment] [?|-h|--help]</code> +<code>lucene index check [<INDEX_DIRECTORY>] [-v|--verbose] [-c|--cross-check-term-vectors] [-dir|--directory-type] [-s|--segment] [?|-h|--help]</code> ### Description @@ -46,10 +46,10 @@ Only check the specified segment(s). This can be specified multiple times, to ch Check the index located at `X:\lucenenet-index\` verbosely, scanning only the segments named `_1j_Lucene41_0` and `_2u_Lucene41_0` for problems: -<code>dotnet lucene-cli.dll index check X:\lucenenet-index -v -s _1j_Lucene41_0 -s _2u_Lucene41_0</code> +<code>lucene index check X:\lucenenet-index -v -s _1j_Lucene41_0 -s _2u_Lucene41_0</code> Check the index located at `C:\taxonomy\` using the `MMapDirectory` memory-mapped directory implementation: -<code>dotnet lucene-cli.dll index check C:\taxonomy --directory-type MMapDirectory</code> +<code>lucene index check C:\taxonomy --directory-type MMapDirectory</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/copy-segments.md b/src/dotnet/tools/lucene-cli/docs/index/copy-segments.md index c9868ef..da89623 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/copy-segments.md +++ b/src/dotnet/tools/lucene-cli/docs/index/copy-segments.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index copy-segments <INPUT_DIRECTORY> <OUTPUT_DIRECTORY> <SEGMENT>[ <SEGMENT_2>...] [?|-h|--help]</code> +<code>lucene index copy-segments <INPUT_DIRECTORY> <OUTPUT_DIRECTORY> <SEGMENT>[ <SEGMENT_2>...] [?|-h|--help]</code> ### Description @@ -36,5 +36,5 @@ Prints out a short help for the command. Copy the `_71_Lucene41_0` segment from the index located at `X:\lucene-index` to the index located at `X:\output`: -<code>dotnet lucene-cli.dll index copy-segments X:\lucene-index X:\output _71_Lucene41_0</code> +<code>lucene index copy-segments X:\lucene-index X:\output _71_Lucene41_0</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/delete-segments.md b/src/dotnet/tools/lucene-cli/docs/index/delete-segments.md index 398d182..07f44fc 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/delete-segments.md +++ b/src/dotnet/tools/lucene-cli/docs/index/delete-segments.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index delete-segments <INDEX_DIRECTORY> <SEGMENT>[ <SEGMENT_2>...] [?|-h|--help]</code> +<code>lucene index delete-segments <INDEX_DIRECTORY> <SEGMENT>[ <SEGMENT_2>...] [?|-h|--help]</code> ### Description @@ -32,4 +32,4 @@ Prints out a short help for the command. Delete the segments named `_8c` and `_83` from the index located at `X:\category-data\`: -<code>dotnet lucene-cli.dll index delete-segments X:\category-data _8c _83</code> +<code>lucene index delete-segments X:\category-data _8c _83</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/extract-cfs.md b/src/dotnet/tools/lucene-cli/docs/index/extract-cfs.md index f6fc40e..1c65a68 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/extract-cfs.md +++ b/src/dotnet/tools/lucene-cli/docs/index/extract-cfs.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index extract-cfs <CFS_FILE_NAME> [-dir|--directory-type] [?|-h|--help]</code> +<code>lucene index extract-cfs <CFS_FILE_NAME> [-dir|--directory-type] [?|-h|--help]</code> ### Description @@ -34,9 +34,9 @@ The FSDirectory implementation to use. If ommitted, it defaults to the optimal F Extract the files from the compound file at `X:\lucene-index\_81.cfs` to the current working directory: -<code>dotnet lucene-cli.dll index extract-cfs X:\lucene-index\_81.cfs</code> +<code>lucene index extract-cfs X:\lucene-index\_81.cfs</code> Extract the files from the compound file at `X:\lucene-index\_64.cfs` to the current working directory using the `SimpleFSDirectory` implementation: -<code>dotnet lucene-cli.dll index extract-cfs X:\lucene-index\_64.cfs --directory-type SimpleFSDirectory</code> \ No newline at end of file +<code>lucene index extract-cfs X:\lucene-index\_64.cfs --directory-type SimpleFSDirectory</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/fix.md b/src/dotnet/tools/lucene-cli/docs/index/fix.md index 3158aab..2c81be8 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/fix.md +++ b/src/dotnet/tools/lucene-cli/docs/index/fix.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index fix [<INDEX_DIRECTORY>] [-v|--verbose] [-c|--cross-check-term-vectors] [-dir|--directory-type] [--dry-run] [?|-h|--help]</code> +<code>lucene index fix [<INDEX_DIRECTORY>] [-v|--verbose] [-c|--cross-check-term-vectors] [-dir|--directory-type] [--dry-run] [?|-h|--help]</code> ### Description @@ -46,9 +46,9 @@ Doesn't change the index, but reports any actions that would be taken if this op Check what a fix operation would do if run on the index located at `X:\product-index\`, using verbose output: -<code>dotnet lucene-cli.dll index fix X:\product-index --verbose --dry-run</code> +<code>lucene index fix X:\product-index --verbose --dry-run</code> Fix the index located at `X:\product-index` and cross check term vectors: -<code>dotnet lucene-cli.dll index fix X:\product-index -c</code> \ No newline at end of file +<code>lucene index fix X:\product-index -c</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/list-cfs.md b/src/dotnet/tools/lucene-cli/docs/index/list-cfs.md index 6629dfa..497dcf3 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/list-cfs.md +++ b/src/dotnet/tools/lucene-cli/docs/index/list-cfs.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index list-cfs <CFS_FILE_NAME> [-dir|--directory-type] [?|-h|--help]</code> +<code>lucene index list-cfs <CFS_FILE_NAME> [-dir|--directory-type] [?|-h|--help]</code> ### Description @@ -32,5 +32,5 @@ The `FSDirectory` implementation to use. If omitted, defaults to the optimal `FS Lists the files within the `X:\categories\_53.cfs` compound file using the `NIOFSDirectory` directory implementation: -<code>dotnet lucene-cli.dll index list-cfs X:\categories\_53.cfs -dir NIOFSDirectory</code> +<code>lucene index list-cfs X:\categories\_53.cfs -dir NIOFSDirectory</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/list-high-freq-terms.md b/src/dotnet/tools/lucene-cli/docs/index/list-high-freq-terms.md index bbeb364..fa0315e 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/list-high-freq-terms.md +++ b/src/dotnet/tools/lucene-cli/docs/index/list-high-freq-terms.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index list-high-freq-terms [<INDEX_DIRECTORY>] [-t|--total-term-frequency] [-n|--number-of-terms] [-f|--field] [?|-h|--help]</code> +<code>lucene index list-high-freq-terms [<INDEX_DIRECTORY>] [-t|--total-term-frequency] [-n|--number-of-terms] [-f|--field] [?|-h|--help]</code> ### Description @@ -41,9 +41,9 @@ The field to consider. If omitted, considers all fields. List the high frequency terms in the index located at `F:\product-index\` on the `description` field, reporting both document frequency and term frequency: -<code>dotnet lucene-cli.dll index list-high-freq-terms F:\product-index --total-term-frequency --field description</code> +<code>lucene index list-high-freq-terms F:\product-index --total-term-frequency --field description</code> List the high frequency terms in the index located at `C:\lucene-index\` on the `name` field, tracking 30 terms: -<code>dotnet lucene-cli.dll index list-high-freq-terms C:\lucene-index --f name -n 30</code> +<code>lucene index list-high-freq-terms C:\lucene-index --f name -n 30</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/list-segments.md b/src/dotnet/tools/lucene-cli/docs/index/list-segments.md index 25f07b9..79d1fed 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/list-segments.md +++ b/src/dotnet/tools/lucene-cli/docs/index/list-segments.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index list-segments [<INDEX_DIRECTORY>] [?|-h|--help]</code> +<code>lucene index list-segments [<INDEX_DIRECTORY>] [?|-h|--help]</code> ### Description @@ -28,5 +28,5 @@ Prints out a short help for the command. List the segments in the index located at `X:\lucene-index\`: -<code>dotnet lucene-cli.dll index list-segments X:\lucene-index</code> +<code>lucene index list-segments X:\lucene-index</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/list-taxonomy-stats.md b/src/dotnet/tools/lucene-cli/docs/index/list-taxonomy-stats.md index 7c43343..0a0dfd2 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/list-taxonomy-stats.md +++ b/src/dotnet/tools/lucene-cli/docs/index/list-taxonomy-stats.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index list-taxonomy-stats [<INDEX_DIRECTORY>] [-tree|--show-tree] [?|-h|--help]</code> +<code>lucene index list-taxonomy-stats [<INDEX_DIRECTORY>] [-tree|--show-tree] [?|-h|--help]</code> ### Description @@ -34,5 +34,5 @@ Recursively lists all descendant nodes. List the taxonomy statistics from the index located at `X:\category-taxonomy-index\`, viewing all descendant nodes: -<code>dotnet lucene-cli.dll index list-taxonomy-stats X:\category-taxonomy-index -tree</code> +<code>lucene index list-taxonomy-stats X:\category-taxonomy-index -tree</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/list-term-info.md b/src/dotnet/tools/lucene-cli/docs/index/list-term-info.md index 61b97e2..f043afa 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/list-term-info.md +++ b/src/dotnet/tools/lucene-cli/docs/index/list-term-info.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index list-term-info <INDEX_DIRECTORY> <FIELD> <TERM> [?|-h|--help]</code> +<code>lucene index list-term-info <INDEX_DIRECTORY> <FIELD> <TERM> [?|-h|--help]</code> ### Description @@ -36,5 +36,5 @@ Prints out a short help for the command. List the term information from the index located at `C:\project-index\`: -<code>dotnet lucene-cli.dll index list-term-info C:\project-index</code> +<code>lucene index list-term-info C:\project-index</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/merge.md b/src/dotnet/tools/lucene-cli/docs/index/merge.md index 98d296f..5793ac6 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/merge.md +++ b/src/dotnet/tools/lucene-cli/docs/index/merge.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index merge <OUTPUT_DIRECTORY> <INPUT_DIRECTORY> <INPUT_DIRECTORY_2>[ <INPUT_DIRECTORY_N>...] [?|-h|--help]</code> +<code>lucene index merge <OUTPUT_DIRECTORY> <INPUT_DIRECTORY> <INPUT_DIRECTORY_2>[ <INPUT_DIRECTORY_N>...] [?|-h|--help]</code> ### Description @@ -32,5 +32,5 @@ Prints out a short help for the command. Merge the indexes `C:\product-index1` and `C:\product-index2` into an index located at `X:\merged-index`: -<code>dotnet lucene-cli.dll index merge X:\merged-index C:\product-index1 C:\product-index2</code> +<code>lucene index merge X:\merged-index C:\product-index1 C:\product-index2</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/split.md b/src/dotnet/tools/lucene-cli/docs/index/split.md index f2343d5..4340de2 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/split.md +++ b/src/dotnet/tools/lucene-cli/docs/index/split.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index split <OUTPUT_DIRECTORY> <INPUT_DIRECTORY>[ <INPUT_DIRECTORY_2>...] [-n|--number-of-parts] [-s|--sequential] [?|-h|--help]</code> +<code>lucene index split <OUTPUT_DIRECTORY> <INPUT_DIRECTORY>[ <INPUT_DIRECTORY_2>...] [-n|--number-of-parts] [-s|--sequential] [?|-h|--help]</code> ### Description @@ -46,9 +46,9 @@ Sequential doc-id range split (default is round-robin). Split the index located at `X:\old-index\` sequentially, placing the resulting 2 indices into the `X:\new-index\` directory: -<code>dotnet lucene-cli.dll index split X:\new-index X:\old-index --sequential</code> +<code>lucene index split X:\new-index X:\old-index --sequential</code> Split the index located at `T:\in\` into 4 parts and place them into the `T:\out\` directory: -<code>dotnet lucene-cli.dll index split T:\out T:\in -n 4</code> \ No newline at end of file +<code>lucene index split T:\out T:\in -n 4</code> diff --git a/src/dotnet/tools/lucene-cli/docs/index/upgrade.md b/src/dotnet/tools/lucene-cli/docs/index/upgrade.md index 20f5861..5c7b550 100644 --- a/src/dotnet/tools/lucene-cli/docs/index/upgrade.md +++ b/src/dotnet/tools/lucene-cli/docs/index/upgrade.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll index upgrade [<INDEX_DIRECTORY>] [-d|--delete-prior-commits] [-v|--verbose] [-dir|--directory-type] [?|-h|--help]</code> +<code>lucene index upgrade [<INDEX_DIRECTORY>] [-d|--delete-prior-commits] [-v|--verbose] [-dir|--directory-type] [?|-h|--help]</code> ### Description @@ -44,9 +44,9 @@ The `FSDirectory` implementation to use. Defaults to the optional `FSDirectory` Upgrade the index format of the index located at `X:\lucene-index\` to the same version as this tool, using the `SimpleFSDirectory` implementation: -<code>dotnet lucene-cli.dll index upgrade X:\lucene-index -dir SimpleFSDirectory</code> +<code>lucene index upgrade X:\lucene-index -dir SimpleFSDirectory</code> Upgrade the index located at `C:\indexes\category-index\` verbosely, deleting all but the last commit: -<code>dotnet lucene-cli.dll index upgrade C:\indexes\category-index --verbose --delete-prior-commits</code> +<code>lucene index upgrade C:\indexes\category-index --verbose --delete-prior-commits</code> diff --git a/src/dotnet/tools/lucene-cli/docs/lock/stress-test.md b/src/dotnet/tools/lucene-cli/docs/lock/stress-test.md index b1d49a5..57daca2 100644 --- a/src/dotnet/tools/lucene-cli/docs/lock/stress-test.md +++ b/src/dotnet/tools/lucene-cli/docs/lock/stress-test.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll lock stress-test <ID> <VERIFIER_HOST> <VERIFIER_PORT> <LOCK_FACTORY_TYPE> <LOCK_DIRECTORY> <SLEEP_TIME_MS> <TRIES> [?|-h|--help]</code> +<code>lucene lock stress-test <ID> <VERIFIER_HOST> <VERIFIER_PORT> <LOCK_FACTORY_TYPE> <LOCK_DIRECTORY> <SLEEP_TIME_MS> <TRIES> [?|-h|--help]</code> ### Description @@ -52,4 +52,4 @@ Prints out a short help for the command. Run the client (stress test), connecting to the server on IP address `127.0.0.4` and port `54464` using the ID 3, the `NativeFSLockFactory`, specifying the lock directory as `F:\temp`, sleep for 50 milliseconds, and try to obtain a lock up to 10 times: -<code>dotnet lucene-cli.dll lock stress-test 3 127.0.0.4 54464 NativeFSLockFactory F:\temp 50 10</code> +<code>lucene lock stress-test 3 127.0.0.4 54464 NativeFSLockFactory F:\temp 50 10</code> diff --git a/src/dotnet/tools/lucene-cli/docs/lock/verify-server.md b/src/dotnet/tools/lucene-cli/docs/lock/verify-server.md index 9350580..1e9028d 100644 --- a/src/dotnet/tools/lucene-cli/docs/lock/verify-server.md +++ b/src/dotnet/tools/lucene-cli/docs/lock/verify-server.md @@ -6,7 +6,7 @@ ### Synopsis -<code>dotnet lucene-cli.dll lock verify-server <IP_HOSTNAME> <MAX_CLIENTS> [?|-h|--help]</code> +<code>lucene lock verify-server <IP_HOSTNAME> <MAX_CLIENTS> [?|-h|--help]</code> ### Description @@ -32,4 +32,4 @@ Prints out a short help for the command. Run the server on IP `127.0.0.4` with a 10 connected clients: -<code>dotnet lucene-cli.dll lock verify-server 127.0.0.4 10</code> +<code>lucene lock verify-server 127.0.0.4 10</code> diff --git a/src/dotnet/tools/lucene-cli/lucene-cli.csproj b/src/dotnet/tools/lucene-cli/lucene-cli.csproj index 5f1d72f..a132873 100644 --- a/src/dotnet/tools/lucene-cli/lucene-cli.csproj +++ b/src/dotnet/tools/lucene-cli/lucene-cli.csproj @@ -24,7 +24,10 @@ <Import Project="$(SolutionDir)Version.proj" /> <PropertyGroup> - <TargetFramework>netcoreapp2.0</TargetFramework> + <TargetFramework>netcoreapp2.1</TargetFramework> + + <PackAsTool>true</PackAsTool> + <ToolCommandName>lucene</ToolCommandName> <AssemblyName>lucene-cli</AssemblyName> <OutputType>Exe</OutputType> @@ -37,6 +40,8 @@ <PackageProjectUrl>http://lucenenet.apache.org/</PackageProjectUrl> <PackageIconUrl>https://github.com/apache/lucenenet/blob/master/branding/logo/lucene-net-icon-128x128.png?raw=true</PackageIconUrl> <Copyright>Copyright © 2006 - 2017 The Apache Software Foundation</Copyright> + <Description>The Lucene.Net command line interface (CLI) is a new cross-platform toolchain with utilities for maintaining Lucene.Net and demos for learning basic Lucene.Net functionality. Run 'lucene' to see usage information.</Description> + <PackageTags>$(PackageTags);maintenance;utility</PackageTags> <DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> <NoWarn>$(NoWarn);1591;1573</NoWarn>
