org.apache.lucene.util.BytesRefHash.find()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(66)

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

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];
}

相关文章