forked from opensearch-project/k-NN
-
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.
- Loading branch information
Showing
6 changed files
with
203 additions
and
19 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
src/main/java/org/opensearch/knn/index/codec/KNN990Codec/KnnExactSearchCollector.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,72 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.knn.index.codec.KNN990Codec; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NonNull; | ||
import lombok.Setter; | ||
import org.apache.lucene.index.LeafReaderContext; | ||
import org.apache.lucene.search.KnnCollector; | ||
import org.apache.lucene.search.TopDocs; | ||
import org.opensearch.knn.index.query.ExactSearcher; | ||
import org.opensearch.knn.index.query.iterators.KNNIterator; | ||
import org.opensearch.knn.index.vectorvalues.KNNVectorValues; | ||
|
||
@Builder | ||
public class KnnExactSearchCollector implements KnnCollector { | ||
|
||
int k; | ||
@Getter String field; | ||
@Getter Boolean useQuantization; | ||
@Getter ExactSearcher.ExactSearcherContext context; | ||
@Getter | ||
LeafReaderContext leafReaderContext; | ||
|
||
@Getter @Setter | ||
KNNIterator knnIterator; | ||
|
||
|
||
@Override | ||
public boolean earlyTerminated() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void incVisitedCount(int i) { | ||
|
||
} | ||
|
||
@Override | ||
public long visitedCount() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public long visitLimit() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int k() { | ||
return k; | ||
} | ||
|
||
@Override | ||
public boolean collect(int i, float v) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public float minCompetitiveSimilarity() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public TopDocs topDocs() { | ||
return null; | ||
} | ||
} |
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
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
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
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
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