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/02/01 10:43:06 UTC
[1/2] lucenenet git commit: Lucene.Net.Tests.Analysis.Stempel: fix
compile issue because of rename of GetDefaultStopSet() > DefaultStopSet
Repository: lucenenet
Updated Branches:
refs/heads/api-work f2e63d354 -> 460653e4e
Lucene.Net.Tests.Analysis.Stempel: fix compile issue because of rename of GetDefaultStopSet() > DefaultStopSet
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/6a16e809
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/6a16e809
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/6a16e809
Branch: refs/heads/api-work
Commit: 6a16e8097ae97229632b94920bb0fe3c7e06741b
Parents: f2e63d3
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Feb 1 17:36:55 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Feb 1 17:36:55 2017 +0700
----------------------------------------------------------------------
src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6a16e809/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
index 0bd90bf..e2e5dea 100644
--- a/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Pl/TestPolishAnalyzer.cs
@@ -56,7 +56,7 @@ namespace Lucene.Net.Analysis.Pl
{
CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, AsSet("studenta"), false); ;
Analyzer a = new PolishAnalyzer(TEST_VERSION_CURRENT,
- PolishAnalyzer.GetDefaultStopSet(), exclusionSet);
+ PolishAnalyzer.DefaultStopSet, exclusionSet);
CheckOneTerm(a, "studenta", "studenta");
CheckOneTerm(a, "studenci", "student");
}
[2/2] lucenenet git commit: Lucene.Net.Highlighter.Passage refactor:
GetMatchStarts() > MatchStarts, GetMatchEnds() > MatchEnds,
GetMatchTerms() > MatchTerms
Posted by ni...@apache.org.
Lucene.Net.Highlighter.Passage refactor: GetMatchStarts() > MatchStarts, GetMatchEnds() > MatchEnds, GetMatchTerms() > MatchTerms
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/460653e4
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/460653e4
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/460653e4
Branch: refs/heads/api-work
Commit: 460653e4ee543a5c8b3f80105b8ae050d3e64b95
Parents: 6a16e80
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Wed Feb 1 17:42:23 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Wed Feb 1 17:42:23 2017 +0700
----------------------------------------------------------------------
.../PostingsHighlight/Passage.cs | 21 ++++++++++----------
.../TestMultiTermHighlighting.cs | 2 +-
.../TestPostingsHighlighterRanking.cs | 6 +++---
3 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/460653e4/src/Lucene.Net.Highlighter/PostingsHighlight/Passage.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/Passage.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/Passage.cs
index 8ec3bfd..54a2446 100644
--- a/src/Lucene.Net.Highlighter/PostingsHighlight/Passage.cs
+++ b/src/Lucene.Net.Highlighter/PostingsHighlight/Passage.cs
@@ -1,4 +1,5 @@
\ufeffusing Lucene.Net.Util;
+using System.Collections.Generic;
using System.Diagnostics;
namespace Lucene.Net.Search.PostingsHighlight
@@ -139,8 +140,8 @@ namespace Lucene.Net.Search.PostingsHighlight
/// <summary>
/// Number of term matches available in
- /// <see cref="GetMatchStarts()"/>, <see cref="GetMatchEnds()"/>,
- /// <see cref="GetMatchTerms()"/>
+ /// <see cref="MatchStarts"/>, <see cref="MatchEnds"/>,
+ /// <see cref="MatchTerms"/>
/// </summary>
public int NumMatches
{
@@ -154,31 +155,31 @@ namespace Lucene.Net.Search.PostingsHighlight
/// offsets are absolute (not relative to <see cref="StartOffset"/>).
/// </summary>
/// <returns></returns>
- public int[] GetMatchStarts()
+ public IReadOnlyList<int> MatchStarts
{
- return matchStarts;
+ get { return matchStarts; }
}
/// <summary>
- /// End offsets of the term matches, corresponding with <see cref="GetMatchStarts()"/>.
+ /// End offsets of the term matches, corresponding with <see cref="MatchStarts"/>.
/// <para/>
/// Only <see cref="NumMatches"/> are valid. Note that its possible that an end offset
/// could exceed beyond the bounds of the passage <see cref="EndOffset"/>, if the
/// <see cref="Analysis.Analyzer"/> produced a term which spans a passage boundary.
/// </summary>
- public int[] GetMatchEnds()
+ public IReadOnlyList<int> MatchEnds
{
- return matchEnds;
+ get { return matchEnds; }
}
/// <summary>
- /// BytesRef (term text) of the matches, corresponding with <see cref="GetMatchStarts()"/>.
+ /// BytesRef (term text) of the matches, corresponding with <see cref="MatchStarts"/>.
/// <para/>
/// Only <see cref="NumMatches"/> are valid.
/// </summary>
- public BytesRef[] GetMatchTerms()
+ public IReadOnlyList<BytesRef> MatchTerms
{
- return matchTerms;
+ get { return matchTerms; }
}
}
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/460653e4/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 0c9b3ab..4a3a314 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestMultiTermHighlighting.cs
@@ -781,7 +781,7 @@ namespace Lucene.Net.Search.PostingsHighlight
int startPos = Math.Max(pos, start);
sb.Append(content, startPos, end - startPos);
sb.Append('(');
- sb.Append(passage.GetMatchTerms()[i].Utf8ToString());
+ sb.Append(passage.MatchTerms[i].Utf8ToString());
sb.Append(')');
sb.Append("</b>");
pos = end;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/460653e4/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 15d3468..7d5ea02 100644
--- a/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs
+++ b/src/Lucene.Net.Tests.Highlighter/PostingsHighlight/TestPostingsHighlighterRanking.cs
@@ -199,12 +199,12 @@ namespace Lucene.Net.Search.PostingsHighlight
int lastMatchStart = -1;
for (int i = 0; i < p.NumMatches; i++)
{
- BytesRef term = p.GetMatchTerms()[i];
- int matchStart = p.GetMatchStarts()[i];
+ BytesRef term = p.MatchTerms[i];
+ int matchStart = p.MatchStarts[i];
assertTrue(matchStart >= 0);
// must at least start within the passage
assertTrue(matchStart < p.EndOffset);
- int matchEnd = p.GetMatchEnds()[i];
+ int matchEnd = p.MatchEnds[i];
assertTrue(matchEnd >= 0);
// always moving forward
assertTrue(matchStart >= lastMatchStart);