Skip to content

Commit

Permalink
Rename to ApproximatePointRangeQueryWeight
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Jul 25, 2024
1 parent 533fd1e commit aba3460
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ public void visit(QueryVisitor visitor) {
}

@Override
public final ApproximateConstantScoreWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException {
public final ApproximatePointRangeQueryWeight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
throws IOException {
Weight pointRangeQueryWeight = pointRangeQuery.createWeight(searcher, scoreMode, boost);

return new ApproximateConstantScoreWeight(this, boost) {
return new ApproximatePointRangeQueryWeight(this, boost) {

private final ArrayUtil.ByteArrayComparator comparator = ArrayUtil.getUnsignedComparator(pointRangeQuery.getBytesPerDim());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@

import java.io.IOException;

public abstract class ApproximateConstantScoreWeight extends ConstantScoreWeight {
/**
* Abstract implementation of {@link ConstantScoreWeight} for {@link ApproximatePointRangeQuery}
*/
public abstract class ApproximatePointRangeQueryWeight extends ConstantScoreWeight {

protected ApproximateConstantScoreWeight(Query query, float score) {
protected ApproximatePointRangeQueryWeight(Query query, float score) {
super(query, score);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ protected String toString(int dimension, byte[] value) {
}
};
IndexSearcher searcher = new IndexSearcher(reader);
ApproximateConstantScoreWeight approximatePointRangeQueryWeight = approximatePointRangeQuery.createWeight(
ApproximatePointRangeQueryWeight approximatePointRangeQueryWeight = approximatePointRangeQuery.createWeight(
searcher,
ScoreMode.TOP_SCORES,
1.0F
Expand Down Expand Up @@ -394,7 +394,7 @@ protected String toString(int dimension, byte[] value) {
}
};
IndexSearcher searcher = new IndexSearcher(reader);
ApproximateConstantScoreWeight approximatePointRangeQueryWeight = approximatePointRangeQuery.createWeight(
ApproximatePointRangeQueryWeight approximatePointRangeQueryWeight = approximatePointRangeQuery.createWeight(
searcher,
ScoreMode.TOP_SCORES,
1.0F
Expand Down

0 comments on commit aba3460

Please sign in to comment.