You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/04/15 15:45:24 UTC
[8/9] lucenenet git commit: SWEEP: Added FEATURE_BREAKITERATOR,
since to date there is still no official .NET Core support for
icu-dotnet. This can be enabled once there is support on NuGet for it and the
icu-dotnet dependency is updated.
SWEEP: Added FEATURE_BREAKITERATOR, since to date there is still no official .NET Core support for icu-dotnet. This can be enabled once there is support on NuGet for it and the icu-dotnet dependency is updated.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e1e5a5ec
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e1e5a5ec
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e1e5a5ec
Branch: refs/heads/api-work
Commit: e1e5a5ec1fdeff041c09c1da9977d96db376bca1
Parents: cda7be8
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Apr 15 22:33:31 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Apr 15 22:33:31 2017 +0700
----------------------------------------------------------------------
src/IcuBreakIterator.cs | 4 +++-
.../Analysis/Th/ThaiAnalyzer.cs | 6 ++++--
.../Analysis/Th/ThaiTokenizer.cs | 5 +++--
.../Analysis/Th/ThaiTokenizerFactory.cs | 6 ++++--
.../Analysis/Th/ThaiWordFilter.cs | 5 +++--
.../Analysis/Th/ThaiWordFilterFactory.cs | 6 ++++--
.../Analysis/Util/CharArrayIterator.cs | 6 ++++--
.../Analysis/Util/SegmentingTokenizerBase.cs | 6 ++++--
.../Lucene.Net.Analysis.Common.csproj | 2 +-
src/Lucene.Net.Analysis.Common/project.json | 2 +-
src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj | 4 ++--
.../PostingsHighlight/PostingsHighlighter.cs | 4 +++-
.../PostingsHighlight/WholeBreakIterator.cs | 4 +++-
.../VectorHighlight/BreakIteratorBoundaryScanner.cs | 4 +++-
src/Lucene.Net.Highlighter/project.json | 2 +-
.../Analysis/Core/TestRandomChains.cs | 3 +++
.../Analysis/Th/TestThaiAnalyzer.cs | 10 ++++++++--
.../Analysis/Th/TestThaiTokenizerFactory.cs | 6 ++++--
.../Analysis/Th/TestThaiWordFilterFactory.cs | 6 ++++--
.../Analysis/Util/TestCharArrayIterator.cs | 7 ++++---
.../Analysis/Util/TestSegmentingTokenizerBase.cs | 5 +++--
.../Lucene.Net.Tests.Analysis.Common.csproj | 2 +-
src/Lucene.Net.Tests.Analysis.Common/project.json | 2 +-
.../Lucene.Net.Tests.Highlighter.csproj | 2 +-
.../PostingsHighlight/TestMultiTermHighlighting.cs | 4 +++-
.../PostingsHighlight/TestPostingsHighlighter.cs | 4 +++-
.../PostingsHighlight/TestPostingsHighlighterRanking.cs | 4 +++-
.../PostingsHighlight/TestWholeBreakIterator.cs | 4 +++-
src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs | 4 +++-
.../VectorHighlight/BreakIteratorBoundaryScannerTest.cs | 4 +++-
src/Lucene.Net.Tests.Highlighter/project.json | 2 +-
src/Lucene.Net.Tests/Lucene.Net.Tests.csproj | 2 +-
src/Lucene.Net.Tests/project.json | 2 +-
src/Lucene.Net/Lucene.Net.csproj | 2 +-
src/Lucene.Net/Support/BreakIterator.cs | 4 +++-
src/Lucene.Net/Support/CharacterIterator.cs | 6 ++++--
src/Lucene.Net/Support/StringCharacterIterator.cs | 4 +++-
src/Lucene.Net/project.json | 1 +
38 files changed, 105 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/IcuBreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/IcuBreakIterator.cs b/src/IcuBreakIterator.cs
index 47e8f69..cc0f7cd 100644
--- a/src/IcuBreakIterator.cs
+++ b/src/IcuBreakIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -390,3 +391,4 @@ namespace Lucene.Net
}
}
}
+#endif
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
index 357d447..aa6e1d7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiAnalyzer.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis.Core;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis.Core;
using Lucene.Net.Analysis.Standard;
using Lucene.Net.Analysis.Util;
using Lucene.Net.Util;
@@ -136,4 +137,5 @@ namespace Lucene.Net.Analysis.Th
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizer.cs
index 2608fba..855473d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizer.cs
@@ -1,4 +1,4 @@
-\ufeff//using Icu;
+\ufeff#if FEATURE_BREAKITERATOR
using Lucene.Net.Analysis.TokenAttributes;
using Lucene.Net.Analysis.Util;
using Lucene.Net.Support;
@@ -206,4 +206,5 @@ namespace Lucene.Net.Analysis.Th
return current;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizerFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizerFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizerFactory.cs
index 99a9839..1fca0d4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizerFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiTokenizerFactory.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis.Util;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis.Util;
using Lucene.Net.Util;
using System.Collections.Generic;
using System.IO;
@@ -49,4 +50,5 @@ namespace Lucene.Net.Analysis.Th
return new ThaiTokenizer(factory, reader);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilter.cs
index 3da11a2..1e78ba2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilter.cs
@@ -1,4 +1,4 @@
-\ufeff//using Icu;
+\ufeff#if FEATURE_BREAKITERATOR
using Lucene.Net.Analysis.Core;
using Lucene.Net.Analysis.TokenAttributes;
using Lucene.Net.Analysis.Util;
@@ -168,4 +168,5 @@ namespace Lucene.Net.Analysis.Th
clonedOffsetAtt = null;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilterFactory.cs
index d0300be..e7907ba 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Th/ThaiWordFilterFactory.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis.Util;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis.Util;
using System;
using System.Collections.Generic;
@@ -51,4 +52,5 @@ namespace Lucene.Net.Analysis.Th
return new ThaiWordFilter(m_luceneMatchVersion, input);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
index b5a3456..7c16980 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
\ufeffusing System;
using System.Diagnostics.CodeAnalysis;
@@ -203,4 +204,5 @@ namespace Lucene.Net.Analysis.Util
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Analysis/Util/SegmentingTokenizerBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/SegmentingTokenizerBase.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/SegmentingTokenizerBase.cs
index a0a63c5..dfa17c9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/SegmentingTokenizerBase.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/SegmentingTokenizerBase.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis.TokenAttributes;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis.TokenAttributes;
using Lucene.Net.Support;
using System;
using System.Diagnostics;
@@ -242,4 +243,5 @@ namespace Lucene.Net.Analysis.Util
/// Returns true if another word is available </summary>
protected abstract bool IncrementWord();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
index 9deaa25..b1afa0d 100644
--- a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
+++ b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
@@ -31,7 +31,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
- <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_DTD_PROCESSING;FEATURE_SERIALIZABLE</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_BREAKITERATOR;FEATURE_CLONEABLE;FEATURE_DTD_PROCESSING;FEATURE_SERIALIZABLE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Analysis.Common/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/project.json b/src/Lucene.Net.Analysis.Common/project.json
index 6c54d9f..3023a26 100644
--- a/src/Lucene.Net.Analysis.Common/project.json
+++ b/src/Lucene.Net.Analysis.Common/project.json
@@ -51,7 +51,7 @@
},
"buildOptions": {
"debugType": "portable",
- "define": [ "FEATURE_CLONEABLE", "FEATURE_DTD_PROCESSING", "FEATURE_SERIALIZABLE" ],
+ "define": [ "FEATURE_BREAKITERATOR", "FEATURE_CLONEABLE", "FEATURE_DTD_PROCESSING", "FEATURE_SERIALIZABLE" ],
"compile": {
"includeFiles": [
"../CommonAssemblyInfo.cs",
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj b/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
index ce684e0..c362f23 100644
--- a/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
+++ b/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;FEATURE_SERIALIZABLE</DefineConstants>
+ <DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -31,7 +31,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
- <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_BREAKITERATOR;FEATURE_SERIALIZABLE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
index 8eb1347..63b9fef 100644
--- a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
+++ b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis;
using Lucene.Net.Index;
using Lucene.Net.Support;
using Lucene.Net.Util;
@@ -953,3 +954,4 @@ namespace Lucene.Net.Search.PostingsHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Highlighter/PostingsHighlight/WholeBreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/WholeBreakIterator.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/WholeBreakIterator.cs
index 57a92b2..9505eb4 100644
--- a/src/Lucene.Net.Highlighter/PostingsHighlight/WholeBreakIterator.cs
+++ b/src/Lucene.Net.Highlighter/PostingsHighlight/WholeBreakIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
using System;
namespace Lucene.Net.Search.PostingsHighlight
@@ -169,3 +170,4 @@ namespace Lucene.Net.Search.PostingsHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Highlighter/VectorHighlight/BreakIteratorBoundaryScanner.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/VectorHighlight/BreakIteratorBoundaryScanner.cs b/src/Lucene.Net.Highlighter/VectorHighlight/BreakIteratorBoundaryScanner.cs
index f902ecd..d739a39 100644
--- a/src/Lucene.Net.Highlighter/VectorHighlight/BreakIteratorBoundaryScanner.cs
+++ b/src/Lucene.Net.Highlighter/VectorHighlight/BreakIteratorBoundaryScanner.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
using System.Text;
namespace Lucene.Net.Search.VectorHighlight
@@ -52,3 +53,4 @@ namespace Lucene.Net.Search.VectorHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Highlighter/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/project.json b/src/Lucene.Net.Highlighter/project.json
index 8284b57..0f4454c 100644
--- a/src/Lucene.Net.Highlighter/project.json
+++ b/src/Lucene.Net.Highlighter/project.json
@@ -38,7 +38,7 @@
"net451": {
"buildOptions": {
"debugType": "portable",
- "define": [ "FEATURE_SERIALIZABLE" ],
+ "define": [ "FEATURE_BREAKITERATOR", "FEATURE_SERIALIZABLE" ],
"compile": {
"includeFiles": [
"../CommonAssemblyInfo.cs",
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
index b7d38e8..8654ffa 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs
@@ -98,9 +98,12 @@ namespace Lucene.Net.Analysis.Core
typeof(CachingTokenFilter),
#if NETSTANDARD
+#if FEATURE_BREAKITERATOR
// LUCENENET TODO: icu-dotnet is throwing AccessViolationException, bringing down the test runner
typeof(Th.ThaiTokenizer),
#endif
+#endif
+
// Not broken: we forcefully add this, so we shouldn't
// also randomly pick it:
typeof(ValidatingTokenFilter)))
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
index dec3b84..ca2d225 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiAnalyzer.cs
@@ -1,4 +1,5 @@
-\ufeffusing System;
+\ufeff#if FEATURE_BREAKITERATOR
+using System;
using NUnit.Framework;
using Lucene.Net.Analysis.Util;
using Lucene.Net.Util;
@@ -133,7 +134,9 @@ namespace Lucene.Net.Analysis.Th
[Test]
public virtual void TestRandomStrings()
{
+#if NETSTANDARD
fail("LUCENENET TODO: AccessViolationException being thrown from icu-dotnet");
+#endif
CheckRandomData(Random(), new ThaiAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
}
@@ -143,7 +146,9 @@ namespace Lucene.Net.Analysis.Th
[Test]
public virtual void TestRandomHugeStrings()
{
+#if NETSTANDARD
fail("LUCENENET TODO: AccessViolationException being thrown from icu-dotnet");
+#endif
Random random = Random();
CheckRandomData(random, new ThaiAnalyzer(TEST_VERSION_CURRENT), 100 * RANDOM_MULTIPLIER, 8192);
}
@@ -180,4 +185,5 @@ namespace Lucene.Net.Analysis.Th
AssertAnalyzesTo(analyzer, "\u0e51\u0e52\u0e53456", new String[] { "\u0e51\u0e52\u0e53456" });
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
index 8663581..0af76b0 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiTokenizerFactory.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis.Util;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis.Util;
using NUnit.Framework;
using System.IO;
@@ -61,4 +62,5 @@ namespace Lucene.Net.Analysis.Th
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
index 380dd47..2b8405f 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Th/TestThaiWordFilterFactory.cs
@@ -1,4 +1,5 @@
-\ufeffusing System;
+\ufeff#if FEATURE_BREAKITERATOR
+using System;
using NUnit.Framework;
using Lucene.Net.Analysis.Util;
using System.IO;
@@ -65,4 +66,5 @@ namespace Lucene.Net.Analysis.Th
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestCharArrayIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestCharArrayIterator.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestCharArrayIterator.cs
index e5791c3..43d9770 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestCharArrayIterator.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestCharArrayIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing System;
+\ufeff#if FEATURE_BREAKITERATOR
+using System;
using Icu;
using Lucene.Net.Analysis.Util;
using Lucene.Net.Util;
@@ -184,5 +185,5 @@ namespace Lucene.Net.Analysis.Util
}
}
}
-
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
index 1addf74..85319dd 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Util/TestSegmentingTokenizerBase.cs
@@ -1,3 +1,4 @@
+#if FEATURE_BREAKITERATOR
using Icu;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.TokenAttributes;
@@ -234,5 +235,5 @@ namespace Lucene.Net.Analysis.Util
}
}
}
-
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
index 4ca6bfc..9cf1542 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
@@ -33,7 +33,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
- <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_BREAKITERATOR;FEATURE_SERIALIZABLE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Analysis.Common/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/project.json b/src/Lucene.Net.Tests.Analysis.Common/project.json
index 69094f5..74923a9 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/project.json
+++ b/src/Lucene.Net.Tests.Analysis.Common/project.json
@@ -118,7 +118,7 @@
"net451": {
"buildOptions": {
"debugType": "portable",
- "define": [ "FEATURE_SERIALIZABLE" ],
+ "define": [ "FEATURE_BREAKITERATOR", "FEATURE_SERIALIZABLE" ],
"compile": {
"includeFiles": [
"../CommonAssemblyInfo.cs"
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj b/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
index 3ed7239..ea8768b 100644
--- a/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
+++ b/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
@@ -31,7 +31,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
- <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_BREAKITERATOR;FEATURE_SERIALIZABLE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs
index 1e342a1..a8497d6 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Search;
@@ -916,3 +917,4 @@ namespace Lucene.Net.Search.PostingsHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
index a874f2d..7c38b78 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighter.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Store;
@@ -1288,3 +1289,4 @@ namespace Lucene.Net.Search.PostingsHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs
index 4c93458..6d94c24 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Analysis;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Analysis;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Store;
@@ -383,3 +384,4 @@ namespace Lucene.Net.Search.PostingsHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestWholeBreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestWholeBreakIterator.cs b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestWholeBreakIterator.cs
index c53bd7f..f3d5451 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestWholeBreakIterator.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestWholeBreakIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
using Lucene.Net.Util;
using NUnit.Framework;
using System;
@@ -156,3 +157,4 @@ namespace Lucene.Net.Search.PostingsHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs b/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
index 4fa1781..07fe932 100644
--- a/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
+++ b/src/Lucene.Net.Tests.Highlighter/TestBreakIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
using Lucene.Net.Util;
using NUnit.Framework;
using System;
@@ -417,3 +418,4 @@ namespace Lucene.Net.Search
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs b/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
index 71d3016..eb3af31 100644
--- a/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
+++ b/src/Lucene.Net.Tests.Highlighter/VectorHighlight/BreakIteratorBoundaryScannerTest.cs
@@ -1,4 +1,5 @@
-\ufeffusing Lucene.Net.Support;
+\ufeff#if FEATURE_BREAKITERATOR
+using Lucene.Net.Support;
using Lucene.Net.Util;
using NUnit.Framework;
using System;
@@ -110,3 +111,4 @@ namespace Lucene.Net.Search.VectorHighlight
}
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests.Highlighter/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/project.json b/src/Lucene.Net.Tests.Highlighter/project.json
index 0ab2992..abaf736 100644
--- a/src/Lucene.Net.Tests.Highlighter/project.json
+++ b/src/Lucene.Net.Tests.Highlighter/project.json
@@ -40,7 +40,7 @@
"net451": {
"buildOptions": {
"debugType": "portable",
- "define": [ "FEATURE_SERIALIZABLE" ],
+ "define": [ "FEATURE_BREAKITERATOR", "FEATURE_SERIALIZABLE" ],
"compile": {
"includeFiles": [
"../CommonAssemblyInfo.cs"
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index 4373d3f..392f90d 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -34,7 +34,7 @@
</PropertyGroup>
<PropertyGroup>
<RootNamespace>Lucene.Net.Tests</RootNamespace>
- <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_BREAKITERATOR;FEATURE_SERIALIZABLE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net.Tests/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/project.json b/src/Lucene.Net.Tests/project.json
index a33df9f..44f6ff2 100644
--- a/src/Lucene.Net.Tests/project.json
+++ b/src/Lucene.Net.Tests/project.json
@@ -89,7 +89,7 @@
"net451": {
"buildOptions": {
"debugType": "portable",
- "define": [ "FEATURE_SERIALIZABLE" ],
+ "define": [ "FEATURE_BREAKITERATOR", "FEATURE_SERIALIZABLE" ],
"compile": {
"includeFiles": [
"../CommonAssemblyInfo.cs"
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net/Lucene.Net.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj
index c05065e..bdc228d 100644
--- a/src/Lucene.Net/Lucene.Net.csproj
+++ b/src/Lucene.Net/Lucene.Net.csproj
@@ -33,7 +33,7 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
- <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_SERIALIZABLE;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_BREAKITERATOR;FEATURE_CLONEABLE;FEATURE_SERIALIZABLE;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net/Support/BreakIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/BreakIterator.cs b/src/Lucene.Net/Support/BreakIterator.cs
index 3146c8c..ded1c9c 100644
--- a/src/Lucene.Net/Support/BreakIterator.cs
+++ b/src/Lucene.Net/Support/BreakIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing System;
+\ufeff#if FEATURE_BREAKITERATOR
+using System;
namespace Lucene.Net.Support
{
@@ -227,3 +228,4 @@ namespace Lucene.Net.Support
public abstract void SetText(CharacterIterator newText);
}
}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net/Support/CharacterIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/CharacterIterator.cs b/src/Lucene.Net/Support/CharacterIterator.cs
index 0919438..0c81629 100644
--- a/src/Lucene.Net/Support/CharacterIterator.cs
+++ b/src/Lucene.Net/Support/CharacterIterator.cs
@@ -1,4 +1,5 @@
-\ufeffusing System;
+\ufeff#if FEATURE_BREAKITERATOR
+using System;
namespace Lucene.Net.Support
{
@@ -45,4 +46,5 @@ namespace Lucene.Net.Support
public abstract string GetTextAsString();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net/Support/StringCharacterIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/StringCharacterIterator.cs b/src/Lucene.Net/Support/StringCharacterIterator.cs
index 584758c..a91e49a 100644
--- a/src/Lucene.Net/Support/StringCharacterIterator.cs
+++ b/src/Lucene.Net/Support/StringCharacterIterator.cs
@@ -1,4 +1,5 @@
-\ufeff/*
+\ufeff#if FEATURE_BREAKITERATOR
+/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -228,3 +229,4 @@ namespace Lucene.Net.Support
}
}
}
+#endif
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e1e5a5ec/src/Lucene.Net/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/project.json b/src/Lucene.Net/project.json
index e90dc84..d6f0799 100644
--- a/src/Lucene.Net/project.json
+++ b/src/Lucene.Net/project.json
@@ -50,6 +50,7 @@
"buildOptions": {
"debugType": "portable",
"define": [
+ "FEATURE_BREAKITERATOR",
"FEATURE_CLONEABLE",
"FEATURE_SERIALIZABLE",
"FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM"