forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
- Loading branch information
1 parent
5abb7ab
commit 7056c52
Showing
12 changed files
with
351 additions
and
220 deletions.
There are no files selected for viewing
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
30 changes: 30 additions & 0 deletions
30
server/src/main/java/org/opensearch/search/approximate/ApproximateConstantScoreWeight.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,30 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.search.approximate; | ||
|
||
import org.apache.lucene.index.PointValues; | ||
import org.apache.lucene.search.ConstantScoreWeight; | ||
import org.apache.lucene.search.Query; | ||
import org.apache.lucene.util.DocIdSetBuilder; | ||
|
||
import java.io.IOException; | ||
|
||
public abstract class ApproximateConstantScoreWeight extends ConstantScoreWeight { | ||
|
||
protected ApproximateConstantScoreWeight(Query query, float score) { | ||
super(query, score); | ||
} | ||
|
||
protected abstract long intersectLeft(PointValues.IntersectVisitor visitor, PointValues.PointTree pointTree) throws IOException; | ||
|
||
protected abstract long intersectRight(PointValues.IntersectVisitor visitor, PointValues.PointTree pointTree) throws IOException; | ||
|
||
protected abstract PointValues.IntersectVisitor getIntersectVisitor(DocIdSetBuilder result) throws IOException; | ||
|
||
} |
Oops, something went wrong.