org.apache.lucene.index.Term.hashCode()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.apache.lucene.index.Term.hashCode()方法的一些代码示例,展示了Term.hashCode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Term.hashCode()方法的具体详情如下:
包路径:org.apache.lucene.index.Term
类名称:Term
方法名:hashCode

Term.hashCode介绍

[英]Combines the hashCode() of the field and the text.
[中]将字段和文本的hashCode()组合在一起。

代码示例

代码示例来源:origin: oracle/opengrok

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + position;
  for (int i=0; i<nTerms; i++) {
    result = prime * result + terms[i].hashCode();
  }
  return result;
}

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
public int hashCode() {
 final int prime = 31;
 int result = 1;
 result = prime * result + position;
 for (int i=0; i<nTerms; i++) {
  result = prime * result + terms[i].hashCode(); 
 }
 return result;
}

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
 public int hashCode() {
  return classHash() ^ term.hashCode();
 }
}

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
public int hashCode() {
 final int prime = 31;
 int result = super.hashCode();
 result = prime * result + maxEdits;
 result = prime * result + prefixLength;
 result = prime * result + maxExpansions;
 result = prime * result + (transpositions ? 0 : 1);
 result = prime * result + ((term == null) ? 0 : term.hashCode());
 return result;
}

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
public int hashCode() {
 final int prime = 31;
 int result = super.hashCode();
 result = prime * result + term.hashCode();
 return result;
}

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
public int hashCode() {
 return classHash() ^ term.hashCode();
}

代码示例来源:origin: org.apache.lucene/lucene-core

@Override
public int hashCode() {
 final int prime = 31;
 int result = super.hashCode();
 result = prime * result + compiled.hashCode();
 result = prime * result + ((term == null) ? 0 : term.hashCode());
 return result;
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public int hashCode() {
  int result = uid.hashCode();
  result = 31 * result + Long.hashCode(seqNo);
  result = 31 * result + Long.hashCode(primaryTerm);
  result = 31 * result + Long.hashCode(version);
  result = 31 * result + versionType.hashCode();
  return result;
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public int hashCode() {
  return 31 * classHash() + term.hashCode();
}

代码示例来源:origin: org.infinispan/infinispan-embedded-query

@Override
public int hashCode() {
 final int prime = 31;
 int result = 1;
 result = prime * result + position;
 for (int i=0; i<nTerms; i++) {
  result = prime * result + terms[i].hashCode(); 
 }
 return result;
}

代码示例来源:origin: INL/BlackLab

@Override
public int hashCode() {
  int h = term.hashCode();
  h ^= maxEdits * 13 + prefixLength * 37;
  return h;
}

代码示例来源:origin: rdelbru/SIREn

/** Returns a hash code value for this object. */
@Override
public int hashCode() {
 return Float.floatToIntBits(this.getBoost())
  ^ term.hashCode()
  ^ levelConstraint
  ^ upperBound
  ^ lowerBound;
}

代码示例来源:origin: org.apache.lucene/com.springsource.org.apache.lucene

/** Returns a hash code value for this object.*/
 public int hashCode() {
  return Float.floatToIntBits(getBoost()) ^ prefix.hashCode() ^ 0x6634D93C;
 }
}

代码示例来源:origin: org.infinispan/infinispan-embedded-query

@Override
 public int hashCode() {
  return super.hashCode() ^ term.hashCode();
 }
}

代码示例来源:origin: org.infinispan/infinispan-embedded-query

@Override
public int hashCode() {
 final int prime = 31;
 int result = super.hashCode();
 result = prime * result + maxEdits;
 result = prime * result + prefixLength;
 result = prime * result + maxExpansions;
 result = prime * result + (transpositions ? 0 : 1);
 result = prime * result + ((term == null) ? 0 : term.hashCode());
 return result;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public int hashCode() {
  int result = uid.hashCode();
  result = 31 * result + Long.hashCode(version);
  result = 31 * result + versionType.hashCode();
  return result;
}

代码示例来源:origin: sirensolutions/siren

@Override
public int hashCode() {
 return Float.floatToIntBits(this.getBoost())
  ^ term.hashCode()
  ^ levelConstraint
  ^ upperBound
  ^ lowerBound;
}

代码示例来源:origin: sirensolutions/siren

/** Returns a hash code value for this object. */
@Override
public int hashCode() {
 return Float.floatToIntBits(this.getBoost())
  ^ term.hashCode()
  ^ levelConstraint
  ^ upperBound
  ^ lowerBound;
}

代码示例来源: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() {
 final int prime = 31;
 int result = super.hashCode();
 result = prime * result + compiled.hashCode();
 result = prime * result + ((term == null) ? 0 : term.hashCode());
 return result;
}

相关文章