Skip to content

Commit

Permalink
Fix merge from main
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Jun 11, 2024
1 parent 1763b3c commit 0be3dfa
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ public static long parseToLong(

@Override
public Query distanceFeatureQuery(Object origin, String pivot, float boost, QueryShardContext context) {
failIfNotIndexedAndNoDocValues();
long originLong = parseToLong(origin, true, null, null, context::nowInMillis);
TimeValue pivotTime = TimeValue.parseTimeValue(pivot, "distance_feature.pivot");
return resolution.distanceFeatureQuery(name(), boost, originLong, pivotTime);
Expand All @@ -606,6 +607,10 @@ public Relation isFieldWithinQuery(
DateMathParser dateParser,
QueryRewriteContext context
) throws IOException {
// if we have only doc_values enabled we do not look at the BKD so we return an INTERSECTS by default
if (isSearchable() == false && hasDocValues()) {
return Relation.INTERSECTS;
}
if (dateParser == null) {
dateParser = this.dateMathParser;
}
Expand Down

0 comments on commit 0be3dfa

Please sign in to comment.