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 53a9af3d6d59449092dab9d9008c248dbfd91875 Author: Shad Storhaug <[email protected]> AuthorDate: Sat Mar 27 09:17:54 2021 +0700 lucene-cli: Added appsettings.json file with the default settings. (See #453) --- src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs | 6 +++--- src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs | 6 +++--- src/dotnet/tools/lucene-cli/appsettings.json | 4 ++++ src/dotnet/tools/lucene-cli/lucene-cli.csproj | 9 +++++++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs index 06ed084..78a71cf 100644 --- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs +++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs @@ -108,8 +108,8 @@ namespace Egothor.Stemmer { qq++; } - // LUCENENET specific - reformatted with : - string charset = SystemProperties.GetProperty("egothor:stemmer:charset", "UTF-8"); + // LUCENENET specific - reformatted with : and changed "charset" to "encoding" + string charset = SystemProperties.GetProperty("egothor:stemmer:encoding", "UTF-8"); var stemmerTables = new List<string>(); // LUCENENET specific @@ -170,7 +170,7 @@ namespace Egothor.Stemmer } } } - catch (InvalidOperationException /*x*/) + catch (InvalidOperationException) { // no base token (stem) on a line } diff --git a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs index 874ad53..e7b4454 100644 --- a/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs +++ b/src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs @@ -95,8 +95,8 @@ namespace Egothor.Stemmer int del = Get(1, args[0]); int rep = Get(2, args[0]); int nop = Get(3, args[0]); - // LUCENENET specific - reformatted with : - string charset = SystemProperties.GetProperty("egothor:stemmer:charset", "UTF-8"); + // LUCENENET specific - reformatted with : and changed "charset" to "encoding" + string charset = SystemProperties.GetProperty("egothor:stemmer:encoding", "UTF-8"); var stemmerTables = new List<string>(); // LUCENENET specific @@ -138,7 +138,7 @@ namespace Egothor.Stemmer } } } - catch (InvalidOperationException /*x*/) + catch (InvalidOperationException) { // no base token (stem) on a line } diff --git a/src/dotnet/tools/lucene-cli/appsettings.json b/src/dotnet/tools/lucene-cli/appsettings.json new file mode 100644 index 0000000..c418238 --- /dev/null +++ b/src/dotnet/tools/lucene-cli/appsettings.json @@ -0,0 +1,4 @@ +{ + "egothor": { "stemmer": { "encoding": "UTF-8" } }, + "benchmark": { "work": { "dir": "work" } } +} diff --git a/src/dotnet/tools/lucene-cli/lucene-cli.csproj b/src/dotnet/tools/lucene-cli/lucene-cli.csproj index 4599efb..ba41309 100644 --- a/src/dotnet/tools/lucene-cli/lucene-cli.csproj +++ b/src/dotnet/tools/lucene-cli/lucene-cli.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one @@ -43,9 +43,13 @@ <NoWarn Label="Remove unused parameter">$(NoWarn);IDE0060</NoWarn> </PropertyGroup> + <ItemGroup> + <None Update="appsettings.json"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </None> + </ItemGroup> <ItemGroup> - <!--<EmbeddedResource Include="..\..\..\Lucene.Net.Benchmark\ByTask\Programmatic\Sample.cs;..\..\..\Lucene.Net.Demo\*.cs;..\..\..\Lucene.Net.Demo\Facet\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />--> <EmbeddedResource Include="..\..\..\Lucene.Net.Benchmark\ByTask\Programmatic\Sample.cs" Link="Resources\Sample.cs" /> <EmbeddedResource Include="..\..\..\Lucene.Net.Demo\*.cs" Exclude="bin\**;obj\**;packages\**;@(EmbeddedResource)" /> <EmbeddedResource Include="..\..\..\Lucene.Net.Demo\Facet\*.cs" Exclude="bin\**;obj\**;packages\**;@(EmbeddedResource)" /> @@ -75,4 +79,5 @@ <ItemGroup> <InternalsVisibleTo Include="Lucene.Net.Tests.Cli" /> </ItemGroup> + </Project>
