@Override public int hashCode() { return QueryHelper.combineHash(bolding, summary); }
@Override public int hashCode() { return getClass().hashCode() + QueryHelper.combineHash(encoding,filter,language,getQueryTree(),sources,restrict,defaultIndex,type,searchPath); }
@Override public boolean equals(Object o) { if (o == this) return true; if( ! (o instanceof Ranking)) return false; Ranking other = (Ranking) o; if ( ! QueryHelper.equals(rankProperties, other.rankProperties)) return false; if ( ! QueryHelper.equals(rankFeatures, other.rankFeatures)) return false; if ( ! QueryHelper.equals(freshness, other.freshness)) return false; if ( ! QueryHelper.equals(this.sorting, other.sorting)) return false; if ( ! QueryHelper.equals(this.location, other.location)) return false; if ( ! QueryHelper.equals(this.profile, other.profile)) return false; return true; }
@Override public int hashCode() { int hash = 0; hash += 11 * rankFeatures.hashCode(); hash += 13 * rankProperties.hashCode(); hash += 17 * matchPhase.hashCode(); hash += 19 * softTimeout.hashCode(); hash += 23 * matching.hashCode(); return Ranking.class.hashCode() + QueryHelper.combineHash(sorting,location,profile,hash); }
public boolean equals(Object o) { if ( ! (o instanceof Model)) return false; Model other = (Model) o; if ( ! ( QueryHelper.equals(other.encoding, this.encoding) && QueryHelper.equals(other.language, this.language) && QueryHelper.equals(other.searchPath, this.searchPath) && QueryHelper.equals(other.sources, this.sources) && QueryHelper.equals(other.restrict, this.restrict) && QueryHelper.equals(other.defaultIndex, this.defaultIndex) && QueryHelper.equals(other.type, this.type) )) return false; if (other.queryTree == null && this.queryTree == null) // don't cause query parsing return QueryHelper.equals(other.queryString, this.queryString) && QueryHelper.equals(other.filter, this.filter); else // make sure we compare a parsed variant of both return QueryHelper.equals(other.getQueryTree(), this.getQueryTree()); }