doEquals for CommonsTerms and SimpleString queries

This commit is contained in:
Alex Ksikes 2015-06-23 15:25:24 -05:00
parent 29d16cd1e8
commit 3284ec9b55
2 changed files with 2 additions and 17 deletions

View File

@ -368,15 +368,7 @@ public class CommonTermsQueryBuilder extends AbstractQueryBuilder<CommonTermsQue
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
CommonTermsQueryBuilder other = (CommonTermsQueryBuilder) obj;
public boolean doEquals(CommonTermsQueryBuilder other) {
return Objects.equals(fieldName, other.fieldName) &&
Objects.equals(text, other.text) &&
Objects.equals(highFreqOperator, other.highFreqOperator) &&

View File

@ -464,14 +464,7 @@ public class SimpleQueryStringBuilder extends AbstractQueryBuilder<SimpleQuerySt
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
SimpleQueryStringBuilder other = (SimpleQueryStringBuilder) obj;
public boolean doEquals(SimpleQueryStringBuilder other) {
return Objects.equals(fieldsAndWeights, other.fieldsAndWeights) && Objects.equals(analyzer, other.analyzer)
&& Objects.equals(defaultOperator, other.defaultOperator) && Objects.equals(queryText, other.queryText)
&& Objects.equals(queryName, other.queryName) && Objects.equals(minimumShouldMatch, other.minimumShouldMatch)