本文整理了Java中org.apache.lucene.util.BytesRefHash.find()
方法的一些代码示例,展示了BytesRefHash.find()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BytesRefHash.find()
方法的具体详情如下:
包路径:org.apache.lucene.util.BytesRefHash
类名称:BytesRefHash
方法名:find
[英]Returns the id of the given BytesRef.
[中]返回给定BytesRef的id。
代码示例来源:origin: sirensolutions/siren-join
public boolean contains(BytesRef term) {
return this.set.find(term) != -1;
}
代码示例来源:origin: flaxsearch/luwak
@Override
protected boolean accept() throws IOException {
return termsHash.find(bytesAtt.getBytesRef()) >= 0;
}
}
代码示例来源:origin: org.apache.lucene/lucene-facet
@Override
public int get(FacetLabel label) {
BytesRef bytes = toBytes(label);
int id;
synchronized (this) {
id = map.find(bytes);
}
if (id == -1) {
return LabelToOrdinal.INVALID_ORDINAL;
}
int page = id >>> PAGE_BITS;
int offset = id & PAGE_MASK;
return ordinals[page][offset];
}
内容来源于网络,如有侵权,请联系作者删除!