lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/50] lucenenet git commit: Lucene.Net.Queries.Mlt.MoreLikeThisQuery: Replaced GetValueHashCode() and SequenceEqual() with Equatable.Wrap(ISet<T>).GetHashCode() and Equatable.Wrap(ISet<T>).Equals() (to allow for the user to supply their own type, since
Date Thu, 30 Mar 2017 17:59:59 GMT
Lucene.Net.Queries.Mlt.MoreLikeThisQuery: Replaced GetValueHashCode() and SequenceEqual() with
Equatable.Wrap(ISet<T>).GetHashCode() and Equatable.Wrap(ISet<T>).Equals() (to
allow for the user to supply their own type, since it is set via a property).


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

Branch: refs/heads/api-work
Commit: 8eb46167c015c789032f798b841f95e7b26a1661
Parents: b30fda1
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Mar 30 05:49:21 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 30 09:12:27 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8eb46167/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs b/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
index 87296e4..999cc7a 100644
--- a/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
+++ b/src/Lucene.Net.Queries/Mlt/MoreLikeThisQuery.cs
@@ -146,7 +146,8 @@ namespace Lucene.Net.Queries.Mlt
             result = prime * result + minTermFrequency;
             result = prime * result + Arrays.GetHashCode(moreLikeFields);
             result = prime * result + Number.SingleToInt32Bits(percentTermsToMatch);
-            result = prime * result + ((stopWords == null) ? 0 : stopWords.GetValueHashCode());
+            // LUCENENET: wrap in Equatable to compare set contents
+            result = prime * result + ((stopWords == null) ? 0 : Equatable.Wrap(stopWords).GetHashCode());
             return result;
         }
 
@@ -225,7 +226,8 @@ namespace Lucene.Net.Queries.Mlt
                     return false;
                 }
             }
-            else if (!stopWords.SetEquals(other.stopWords))
+            // LUCENENET: wrap in Equatable to compare set contents
+            else if (!Equatable.Wrap(stopWords).Equals(other.stopWords))
             {
                 return false;
             }


Mime
View raw message