lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/2] lucenenet git commit: change how TopTermsRewrite instance of is checked
Date Thu, 23 Apr 2015 11:56:41 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master c7b14909f -> fdda2059b


change how TopTermsRewrite instance of is checked


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d021a522
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d021a522
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d021a522

Branch: refs/heads/master
Commit: d021a5228de4a35e82c96ad45266ec5a520d7e0f
Parents: c7b1490
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Tue Apr 21 20:43:04 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Tue Apr 21 20:43:04 2015 -0400

----------------------------------------------------------------------
 src/Lucene.Net.Core/Lucene.Net.csproj                         | 1 +
 src/Lucene.Net.Core/Search/ITopTermsRewrite.cs                | 7 +++++++
 src/Lucene.Net.Core/Search/Spans/SpanMultiTermQueryWrapper.cs | 4 ++--
 src/Lucene.Net.Core/Search/TopTermsRewrite.cs                 | 2 +-
 4 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d021a522/src/Lucene.Net.Core/Lucene.Net.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.csproj b/src/Lucene.Net.Core/Lucene.Net.csproj
index 5cfcce9..7fd88bc 100644
--- a/src/Lucene.Net.Core/Lucene.Net.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.csproj
@@ -438,6 +438,7 @@
     <Compile Include="Search\FuzzyTermsEnum.cs" />
     <Compile Include="Search\HitQueue.cs" />
     <Compile Include="Search\IndexSearcher.cs" />
+    <Compile Include="Search\ITopTermsRewrite.cs" />
     <Compile Include="Search\LiveFieldValues.cs" />
     <Compile Include="Search\MatchAllDocsQuery.cs" />
     <Compile Include="Search\IMaxNonCompetitiveBoostAttribute.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d021a522/src/Lucene.Net.Core/Search/ITopTermsRewrite.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/ITopTermsRewrite.cs b/src/Lucene.Net.Core/Search/ITopTermsRewrite.cs
new file mode 100644
index 0000000..af22fd1
--- /dev/null
+++ b/src/Lucene.Net.Core/Search/ITopTermsRewrite.cs
@@ -0,0 +1,7 @@
+namespace Lucene.Net.Search
+{
+    public interface ITopTermsRewrite
+    {
+        int Size { get; }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d021a522/src/Lucene.Net.Core/Search/Spans/SpanMultiTermQueryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Spans/SpanMultiTermQueryWrapper.cs b/src/Lucene.Net.Core/Search/Spans/SpanMultiTermQueryWrapper.cs
index 43d0908..2a41e9b 100644
--- a/src/Lucene.Net.Core/Search/Spans/SpanMultiTermQueryWrapper.cs
+++ b/src/Lucene.Net.Core/Search/Spans/SpanMultiTermQueryWrapper.cs
@@ -64,9 +64,9 @@ namespace Lucene.Net.Search.Spans
             this.query = query_;
 
             MultiTermQuery.RewriteMethod method = query.GetRewriteMethod();
-            if (method is TopTermsRewrite<Q>)
+            if (method is ITopTermsRewrite)
             {
-                int pqsize = ((TopTermsRewrite<Q>)method).Size;
+                int pqsize = ((ITopTermsRewrite)method).Size;
                 RewriteMethod = new TopTermsSpanBooleanQueryRewrite(pqsize);
             }
             else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d021a522/src/Lucene.Net.Core/Search/TopTermsRewrite.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/TopTermsRewrite.cs b/src/Lucene.Net.Core/Search/TopTermsRewrite.cs
index e685872..f073ec0 100644
--- a/src/Lucene.Net.Core/Search/TopTermsRewrite.cs
+++ b/src/Lucene.Net.Core/Search/TopTermsRewrite.cs
@@ -37,7 +37,7 @@ namespace Lucene.Net.Search
     /// via a priority queue.
     /// @lucene.internal Only public to be accessible by spans package.
     /// </summary>
-    public abstract class TopTermsRewrite<Q> : TermCollectingRewrite<Q>
+    public abstract class TopTermsRewrite<Q> : TermCollectingRewrite<Q>, ITopTermsRewrite
         where Q : Query
     {
         private readonly int size;


Mime
View raw message