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

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

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

BitSet.leapFrog介绍

[英]Performs a leap frog between this and the provided iterator in order to find common documents.
[中]在该迭代器和提供的迭代器之间执行蛙跳,以查找通用文档。

代码示例

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

/** this = this AND NOT other. The state of the iterator after this operation
 *  terminates is undefined. */
@Deprecated
public void andNot(DocIdSetIterator iter) throws IOException {
 assertUnpositioned(iter);
 leapFrog(iter, new LeapFrogCallBack() {
  @Override
  public void onMatch(int doc) {
   clear(doc);
  }
 });
}

代码示例来源:origin: harbby/presto-connectors

/** this = this AND NOT other. The state of the iterator after this operation
 *  terminates is undefined. */
@Deprecated
public void andNot(DocIdSetIterator iter) throws IOException {
 assertUnpositioned(iter);
 leapFrog(iter, new LeapFrogCallBack() {
  @Override
  public void onMatch(int doc) {
   clear(doc);
  }
 });
}

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

/** Does in-place AND of the bits provided by the iterator. The state of the
 *  iterator after this operation terminates is undefined. */
@Deprecated
public void and(DocIdSetIterator iter) throws IOException {
 assertUnpositioned(iter);
 leapFrog(iter, new LeapFrogCallBack() {
  int previous = -1;
  @Override
  public void onMatch(int doc) {
   clear(previous + 1, doc);
   previous = doc;
  }
  @Override
  public void finish() {
   if (previous + 1 < length()) {
    clear(previous + 1, length());
   }
  }
 });
}

代码示例来源:origin: harbby/presto-connectors

/** Does in-place AND of the bits provided by the iterator. The state of the
 *  iterator after this operation terminates is undefined. */
@Deprecated
public void and(DocIdSetIterator iter) throws IOException {
 assertUnpositioned(iter);
 leapFrog(iter, new LeapFrogCallBack() {
  int previous = -1;
  @Override
  public void onMatch(int doc) {
   clear(previous + 1, doc);
   previous = doc;
  }
  @Override
  public void finish() {
   if (previous + 1 < length()) {
    clear(previous + 1, length());
   }
  }
 });
}

相关文章