本文整理了Java中org.apache.lucene.search.Query.hashCode
方法的一些代码示例,展示了Query.hashCode
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.hashCode
方法的具体详情如下:
包路径:org.apache.lucene.search.Query
类名称:Query
方法名:hashCode
[英]Override and implement query hash code properly in a subclass. This is required so that QueryCache works properly.
[中]在子类中正确重写和实现查询哈希代码。这是QueryCache正常工作所必需的。
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public int hashCode() {
int h = classHash();
h = 31 * h + indexQuery.hashCode();
h = 31 * h + dvQuery.hashCode();
return h;
}
代码示例来源:origin: org.apache.lucene/lucene-core
int frequency(Query query) {
assert query instanceof BoostQuery == false;
assert query instanceof ConstantScoreQuery == false;
// call hashCode outside of sync block
// in case it's somewhat expensive:
int hashCode = query.hashCode();
synchronized (this) {
return recentlyUsedFilters.frequency(hashCode);
}
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public int hashCode() {
int h = classHash();
h = 31 * h + query.hashCode();
h = 31 * h + Float.floatToIntBits(boost);
return h;
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public int hashCode() {
return 31 * classHash() + query.hashCode();
}
}
代码示例来源:origin: org.apache.lucene/lucene-core
/** Returns a hash code value for this object.*/
@Override
public int hashCode() {
return 31 * query.hashCode() + occur.hashCode();
}
代码示例来源:origin: org.apache.lucene/lucene-core
@Override
public void onUse(Query query) {
assert query instanceof BoostQuery == false;
assert query instanceof ConstantScoreQuery == false;
if (shouldNeverCache(query)) {
return;
}
// call hashCode outside of sync block
// in case it's somewhat expensive:
int hashCode = query.hashCode();
// we only track hash codes to avoid holding references to possible
// large queries; this may cause rare false positives, but at worse
// this just means we cache a query that was not in fact used enough:
synchronized (this) {
recentlyUsedFilters.add(hashCode);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public int hashCode() {
return 31 * getClass().hashCode() + query.hashCode();
}
}
代码示例来源:origin: com.atlassian.jira/jira-api
@Override
public int hashCode()
{
int result = luceneQuery.hashCode();
result = 31 * result + (mustNotOccur ? 1 : 0);
return result;
}
代码示例来源:origin: hibernate/hibernate-search
@Override
public int hashCode() {
int hashCode = 31 * super.hashCode() + spatialHashCellsIds.hashCode();
hashCode = 31 * hashCode + fieldName.hashCode();
return hashCode;
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
/** Returns a hash code value for this object.*/
@Override
public int hashCode() {
int h = super.hashCode();
h = 31 * h + slop;
h = 31 * h + terms.hashCode();
h = 31 * h + positions.hashCode();
return h;
}
代码示例来源:origin: kzwang/elasticsearch-image
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + hashFieldName.hashCode();
result = 31 * result + Arrays.hashCode(hashes);
result = 31 * result + maxResult;
result = 31 * result + luceneFieldName.hashCode();
result = 31 * result + lireFeature.hashCode();
return result;
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public int hashCode() {
int h = super.hashCode();
h = 31 * h + Arrays.hashCode(terms);
h = 31 * h + Arrays.hashCode(contexts);
h = 31 * h + Arrays.hashCode(boosts);
h = 31 * h + rewriteMethod.hashCode();
return h;
}
代码示例来源:origin: hibernate/hibernate-search
@Override
public int hashCode() {
int hashCode = 31 * super.hashCode() + approximationQuery.hashCode();
hashCode = 31 * hashCode + center.hashCode();
hashCode = 31 * hashCode + Double.hashCode( radius );
hashCode = 31 * hashCode + Objects.hashCode( coordinatesField );
hashCode = 31 * hashCode + Objects.hashCode( latitudeField );
hashCode = 31 * hashCode + Objects.hashCode( longitudeField );
return hashCode;
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
int frequency(Query query) {
assert query instanceof BoostQuery == false;
assert query instanceof ConstantScoreQuery == false;
// call hashCode outside of sync block
// in case it's somewhat expensive:
int hashCode = query.hashCode();
synchronized (this) {
return recentlyUsedFilters.frequency(hashCode);
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public int hashCode() {
return super.hashCode() ^ func.hashCode();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
/** Returns a hash code value for this object.*/
@Override
public int hashCode() {
return 31 * query.hashCode() + occur.hashCode();
}
代码示例来源:origin: kzwang/elasticsearch-image
@Override
public int hashCode() {
int result = super.hashCode();
result = 31 * result + term.hashCode();
result = 31 * result + luceneFieldName.hashCode();
result = 31 * result + lireFeature.hashCode();
result = Float.floatToIntBits(getBoost()) ^ result;
return result;
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
@Override
public int hashCode() {
return super.hashCode()
^ fieldName.hashCode()
^ qf.hashCode()
^ srndQuery.hashCode();
}
代码示例来源:origin: org.apache.lucene/lucene-queries
@Override
public int hashCode() {
int h = classHash();
h = 31 * h + q.hashCode();
h = 31 * h + boostVal.hashCode();
return h;
}
代码示例来源:origin: org.apache.lucene/lucene-spatial-extras
@Override
public int hashCode() {
int result = classHash();
result = 31 * result + indexQuery.hashCode();
result = 31 * result + predicateValueSource.hashCode();
return result;
}
内容来源于网络,如有侵权,请联系作者删除!