本文整理了Java中org.apache.lucene.search.Query.equals
方法的一些代码示例,展示了Query.equals
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.equals
方法的具体详情如下:
包路径:org.apache.lucene.search.Query
类名称:Query
方法名:equals
[英]Override and implement query instance equivalence properly in a subclass. This is required so that QueryCache works properly. Typically a query will be equal to another only if it's an instance of the same class and its document-filtering properties are identical that other instance. Utility methods are provided for certain repetitive code.
[中]在子类中正确重写和实现查询实例等价性。这是QueryCache正常工作所必需的。通常,只有当一个查询是同一类的实例且其文档过滤属性与另一个实例相同时,该查询才会与另一个查询相等。为某些重复代码提供了实用方法。
代码示例来源:origin: org.apache.lucene/lucene-core
/** Returns true if <code>o</code> is equal to this. */
@Override
public boolean equals(Object o) {
if (o == null || !(o instanceof BooleanClause))
return false;
BooleanClause other = (BooleanClause)o;
return this.query.equals(other.query)
&& this.occur == other.occur;
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public boolean equals(Object obj) {
if (sameClassAs(obj) == false) {
return false;
}
IndexOrDocValuesQuery that = (IndexOrDocValuesQuery) obj;
return indexQuery.equals(that.indexQuery) && dvQuery.equals(that.dvQuery);
}
代码示例来源:origin: org.apache.lucene/lucene-core
private boolean equalsTo(BoostQuery other) {
return query.equals(other.query) &&
Float.floatToIntBits(boost) == Float.floatToIntBits(other.boost);
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public boolean equals(Object other) {
return sameClassAs(other) &&
query.equals(((ConstantScoreQuery) other).query);
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public boolean equals(Object o) {
if (!(o instanceof QueryWrapperBitSetProducer)) return false;
return this.query.equals(((QueryWrapperBitSetProducer) o).query);
}
代码示例来源:origin: hibernate/hibernate-search
@Override
public boolean equals(Object o) {
if ( !super.equals( o ) ) {
return false;
}
final CachingWrapperQuery other = (CachingWrapperQuery) o;
return this.query.equals( other.query );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
/** Returns true if <code>o</code> is equal to this. */
@Override
public boolean equals(Object o) {
if (o == null || !(o instanceof BooleanClause))
return false;
BooleanClause other = (BooleanClause)o;
return this.query.equals(other.query)
&& this.occur == other.occur;
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public boolean equals(Object obj) {
if (super.equals(obj) == false) {
return false;
}
BoostQuery that = (BoostQuery) obj;
return query.equals(that.query);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
@Override
public boolean equals(Object o) {
if (!(o instanceof QueryWrapperBitSetProducer)) return false;
return this.query.equals(((QueryWrapperBitSetProducer) o).query);
}
代码示例来源:origin: org.apache.lucene/lucene-queries
@Override
public boolean equals(Object o) {
if (QueryValueSource.class != o.getClass()) return false;
QueryValueSource other = (QueryValueSource)o;
return this.q.equals(other.q) && this.defVal==other.defVal;
}
代码示例来源:origin: org.apache.lucene/lucene-queries
private boolean equalsTo(CustomScoreQuery other) {
return subQuery.equals(other.subQuery) &&
scoringQueries.length == other.scoringQueries.length &&
Arrays.equals(scoringQueries, other.scoringQueries);
}
代码示例来源:origin: org.apache.lucene/lucene-queries
private boolean equalsTo(BoostingQuery other) {
return match.equals(other.match)
&& context.equals(other.context)
&& Float.floatToIntBits(contextBoost) == Float.floatToIntBits(other.contextBoost);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public boolean equals(Object o) {
if (!super.equals(o)) return false;
BoostedQuery other = (BoostedQuery)o;
return this.q.equals(other.q)
&& this.boostVal.equals(other.boostVal);
}
代码示例来源:origin: com.strapdata.elasticsearch.plugin/parent-join
@Override
public boolean equals(Object o) {
if (sameClassAs(o) == false) return false;
LateParsingQuery that = (LateParsingQuery) o;
if (minChildren != that.minChildren) return false;
if (maxChildren != that.maxChildren) return false;
if (!toQuery.equals(that.toQuery)) return false;
if (!innerQuery.equals(that.innerQuery)) return false;
if (!joinField.equals(that.joinField)) return false;
return scoreMode == that.scoreMode;
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public boolean equals(Object obj) {
if (super.equals(obj) == false) {
return false;
}
BlendedTermQuery that = (BlendedTermQuery) obj;
return Arrays.equals(terms, that.terms)
&& Arrays.equals(contexts, that.contexts)
&& Arrays.equals(boosts, that.boosts)
&& rewriteMethod.equals(that.rewriteMethod);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FunctionRangeQuery)) return false;
if (!super.equals(o)) return false;
FunctionRangeQuery that = (FunctionRangeQuery) o;
return Objects.equals(includeLower, that.includeLower) &&
Objects.equals(includeUpper, that.includeUpper) &&
Objects.equals(valueSource, that.valueSource) &&
Objects.equals(lowerVal, that.lowerVal) &&
Objects.equals(upperVal, that.upperVal);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public final boolean equals(final Object o) {
if (super.equals(o) == false) {
return false;
}
MultiTermQueryDocValuesWrapper that = (MultiTermQueryDocValuesWrapper) o;
return query.equals(that.query);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public boolean equals(Object o) {
if (super.equals(o) == false) {
return false;
}
return this.query.equals(((QueryWrapperFilter)o).query);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public boolean equals(Object obj) {
if (super.equals(obj) == false) {
return false;
}
ValueSourceQuery other = (ValueSourceQuery) obj;
return range.equals(other.range)
&& Objects.equals(fastMatchQuery, other.fastMatchQuery)
&& valueSource.equals(other.valueSource);
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public final boolean equals(final Object o) {
if (super.equals(o) == false) {
return false;
}
final MultiTermQueryConstantScoreWrapper<?> that = (MultiTermQueryConstantScoreWrapper<?>) o;
return this.query.equals(that.query);
}
内容来源于网络,如有侵权,请联系作者删除!