File tree 2 files changed +16
-2
lines changed
server/src/main/java/org/opensearch/search
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 40
40
import org .opensearch .core .xcontent .XContentBuilder ;
41
41
import org .opensearch .core .xcontent .XContentParser ;
42
42
import org .opensearch .index .query .QueryShardContext ;
43
+ import org .opensearch .index .query .WithFieldName ;
43
44
import org .opensearch .script .Script ;
44
45
import org .opensearch .search .aggregations .AbstractAggregationBuilder ;
45
46
import org .opensearch .search .aggregations .AggregationInitializationException ;
57
58
*
58
59
* @opensearch.internal
59
60
*/
60
- public abstract class ValuesSourceAggregationBuilder <AB extends ValuesSourceAggregationBuilder <AB >> extends AbstractAggregationBuilder <AB > {
61
+ public abstract class ValuesSourceAggregationBuilder <AB extends ValuesSourceAggregationBuilder <AB >> extends AbstractAggregationBuilder <AB >
62
+ implements
63
+ WithFieldName {
61
64
62
65
public static <T > void declareFields (
63
66
AbstractObjectParser <? extends ValuesSourceAggregationBuilder <?>, T > objectParser ,
@@ -292,6 +295,11 @@ public String field() {
292
295
return field ;
293
296
}
294
297
298
+ @ Override
299
+ public String fieldName () {
300
+ return field ();
301
+ }
302
+
295
303
/**
296
304
* Sets the script to use for this aggregation.
297
305
*/
Original file line number Diff line number Diff line change 65
65
import org .opensearch .index .query .QueryRewriteContext ;
66
66
import org .opensearch .index .query .QueryShardContext ;
67
67
import org .opensearch .index .query .QueryShardException ;
68
+ import org .opensearch .index .query .WithFieldName ;
68
69
import org .opensearch .search .DocValueFormat ;
69
70
import org .opensearch .search .MultiValueMode ;
70
71
import org .opensearch .search .SearchSortValuesAndFormats ;
86
87
*
87
88
* @opensearch.internal
88
89
*/
89
- public class FieldSortBuilder extends SortBuilder <FieldSortBuilder > {
90
+ public class FieldSortBuilder extends SortBuilder <FieldSortBuilder > implements WithFieldName {
90
91
private static final DeprecationLogger deprecationLogger = DeprecationLogger .getLogger (FieldSortBuilder .class );
91
92
92
93
public static final String NAME = "field_sort" ;
@@ -184,6 +185,11 @@ public String getFieldName() {
184
185
return this .fieldName ;
185
186
}
186
187
188
+ @ Override
189
+ public String fieldName () {
190
+ return getFieldName ();
191
+ }
192
+
187
193
/**
188
194
* Sets the value when a field is missing in a doc. Can also be set to {@code _last} or
189
195
* {@code _first} to sort missing last or first respectively.
You can’t perform that action at this time.
0 commit comments