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/01/26 14:38:05 UTC

[07/12] lucenenet git commit: Lucene.Net.Join.ToChildBlockJoinQuery refactor: InvalidQueryMessage > INVALID_QUERY_MESSAGE

Lucene.Net.Join.ToChildBlockJoinQuery refactor: InvalidQueryMessage > INVALID_QUERY_MESSAGE


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

Branch: refs/heads/api-work
Commit: 88fb28903a800835c96accdfa632012c5923129c
Parents: 9f6b2c3
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Jan 26 20:07:37 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Jan 26 20:07:37 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Join/ToChildBlockJoinQuery.cs         | 4 ++--
 src/Lucene.Net.Tests.Join/TestBlockJoinValidation.cs | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/88fb2890/src/Lucene.Net.Join/ToChildBlockJoinQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Join/ToChildBlockJoinQuery.cs b/src/Lucene.Net.Join/ToChildBlockJoinQuery.cs
index 24d1908..0001184 100644
--- a/src/Lucene.Net.Join/ToChildBlockJoinQuery.cs
+++ b/src/Lucene.Net.Join/ToChildBlockJoinQuery.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.Join
         /// Message thrown from <see cref="ToChildBlockJoinScorer.ValidateParentDoc"/>
         /// on mis-use, when the parent query incorrectly returns child docs. 
         /// </summary>
-        internal const string InvalidQueryMessage = "Parent query yields document which is not matched by parents filter, docID="; // LUCENENET TODO: Rename INVALID_QUERY_MESSAGE
+        internal const string INVALID_QUERY_MESSAGE = "Parent query yields document which is not matched by parents filter, docID=";
 
         private readonly Filter _parentsFilter;
         private readonly Query _parentQuery;
@@ -270,7 +270,7 @@ namespace Lucene.Net.Join
             {
                 if (_parentDoc != NO_MORE_DOCS && !_parentBits.Get(_parentDoc))
                 {
-                    throw new InvalidOperationException(InvalidQueryMessage + _parentDoc);
+                    throw new InvalidOperationException(INVALID_QUERY_MESSAGE + _parentDoc);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/88fb2890/src/Lucene.Net.Tests.Join/TestBlockJoinValidation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/TestBlockJoinValidation.cs b/src/Lucene.Net.Tests.Join/TestBlockJoinValidation.cs
index 724b7f1..ecc14c4 100644
--- a/src/Lucene.Net.Tests.Join/TestBlockJoinValidation.cs
+++ b/src/Lucene.Net.Tests.Join/TestBlockJoinValidation.cs
@@ -106,7 +106,7 @@ namespace Lucene.Net.Tests.Join
             var blockJoinQuery = new ToChildBlockJoinQuery(parentQueryWithRandomChild, ParentsFilter, false);
 
             var ex = Throws<InvalidOperationException>(() => IndexSearcher.Search(blockJoinQuery, 1));
-            StringAssert.Contains(ToChildBlockJoinQuery.InvalidQueryMessage, ex.Message);
+            StringAssert.Contains(ToChildBlockJoinQuery.INVALID_QUERY_MESSAGE, ex.Message);
         }
         
         [Test]
@@ -125,7 +125,7 @@ namespace Lucene.Net.Tests.Join
             conjunctionQuery.Add(new BooleanClause(blockJoinQuery, Occur.MUST));
             
             var ex = Throws<InvalidOperationException>(() => IndexSearcher.Search(conjunctionQuery, 1));
-            StringAssert.Contains(ToChildBlockJoinQuery.InvalidQueryMessage, ex.Message);
+            StringAssert.Contains(ToChildBlockJoinQuery.INVALID_QUERY_MESSAGE, ex.Message);
         }
 
         private IList<Document> CreateDocsForSegment(int segmentNumber)