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

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

本文整理了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

  1. /** this = this AND NOT other. The state of the iterator after this operation
  2. * terminates is undefined. */
  3. @Deprecated
  4. public void andNot(DocIdSetIterator iter) throws IOException {
  5. assertUnpositioned(iter);
  6. leapFrog(iter, new LeapFrogCallBack() {
  7. @Override
  8. public void onMatch(int doc) {
  9. clear(doc);
  10. }
  11. });
  12. }

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

  1. /** this = this AND NOT other. The state of the iterator after this operation
  2. * terminates is undefined. */
  3. @Deprecated
  4. public void andNot(DocIdSetIterator iter) throws IOException {
  5. assertUnpositioned(iter);
  6. leapFrog(iter, new LeapFrogCallBack() {
  7. @Override
  8. public void onMatch(int doc) {
  9. clear(doc);
  10. }
  11. });
  12. }

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

  1. /** Does in-place AND of the bits provided by the iterator. The state of the
  2. * iterator after this operation terminates is undefined. */
  3. @Deprecated
  4. public void and(DocIdSetIterator iter) throws IOException {
  5. assertUnpositioned(iter);
  6. leapFrog(iter, new LeapFrogCallBack() {
  7. int previous = -1;
  8. @Override
  9. public void onMatch(int doc) {
  10. clear(previous + 1, doc);
  11. previous = doc;
  12. }
  13. @Override
  14. public void finish() {
  15. if (previous + 1 < length()) {
  16. clear(previous + 1, length());
  17. }
  18. }
  19. });
  20. }

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

  1. /** Does in-place AND of the bits provided by the iterator. The state of the
  2. * iterator after this operation terminates is undefined. */
  3. @Deprecated
  4. public void and(DocIdSetIterator iter) throws IOException {
  5. assertUnpositioned(iter);
  6. leapFrog(iter, new LeapFrogCallBack() {
  7. int previous = -1;
  8. @Override
  9. public void onMatch(int doc) {
  10. clear(previous + 1, doc);
  11. previous = doc;
  12. }
  13. @Override
  14. public void finish() {
  15. if (previous + 1 < length()) {
  16. clear(previous + 1, length());
  17. }
  18. }
  19. });
  20. }

相关文章