-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Add EmptyHitCounter for use in MatchHashesAndScoreQuerySuite (
#601)
- Loading branch information
1 parent
2c20ce5
commit 8b7f42e
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
elastiknn-lucene/src/main/java/com/klibisz/elastiknn/search/EmptyHitCounter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.klibisz.elastiknn.search; | ||
|
||
import org.apache.lucene.search.KthGreatest; | ||
|
||
public final class EmptyHitCounter implements HitCounter { | ||
@Override | ||
public void increment(int key, short count) {} | ||
|
||
@Override | ||
public void increment(int key, int count) {} | ||
|
||
@Override | ||
public boolean isEmpty() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public short get(int key) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int numHits() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int capacity() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int minKey() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int maxKey() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public KthGreatest.Result kthGreatest(int k) { | ||
return new KthGreatest.Result((short) 0, 0, 0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters