@@ -104,18 +104,18 @@ public enum CQLFields implements CQLFieldsInterface {
104104 (order ) -> new SortOptions .Builder ().script (s -> s
105105 .type (ScriptSortType .Number )
106106 .nested (NestedSortValue .of (p -> p .path (StacSummeries .Temporal .sortField )))
107- .script (script -> script . inline ( line -> line
107+ .script (script -> script
108108 .lang ("painless" )
109109 .source ("if (doc['" + StacSummeries .TemporalEnd .searchField + "'].size() == 0) {" +
110- " return Long.MAX_VALUE; " +
110+ " return Long.MAX_VALUE; " +
111111 " } " +
112112 " else {" +
113113 " return doc['" + StacSummeries .TemporalEnd .searchField + "'].stream()" +
114114 " .mapToLong(f -> f.toEpochMilli())" +
115115 " .max()" +
116116 " .getAsLong()" +
117117 " }"
118- ))
118+ )
119119 ).order (order )
120120 )
121121 ),
@@ -312,22 +312,23 @@ public enum CQLFields implements CQLFieldsInterface {
312312
313313 @ Override
314314 public Query getPropertyEqualToQuery (String literal ) {
315- if (getOverridePropertyEqualsToQuery () == null ) {
315+ if (getOverridePropertyEqualsToQuery () == null ) {
316316 return MatchPhraseQuery .of (builder -> builder
317317 .field (this .searchField )
318318 .query (literal )
319319 )._toQuery ();
320- }
321- else {
320+ } else {
322321 return getOverridePropertyEqualsToQuery ().apply (literal );
323322 }
324323 }
325324
326325 @ Override
327326 public Query getPropertyGreaterThanOrEqualsToQuery (String literal ) {
328- return RangeQuery .of (builder -> builder
329- .field (this .searchField )
330- .gte (JsonData .of (literal ))
327+ return RangeQuery .of (builder -> builder
328+ // set as untyped because the property type is uncertain
329+ .untyped (u -> u
330+ .field (this .searchField )
331+ .gte (JsonData .of (literal )))
331332 )._toQuery ();
332333 }
333334
@@ -354,7 +355,7 @@ public Query getBoundingBoxQuery(TopLeftBottomRightGeoBounds tlbr) {
354355 @ Override
355356 public Query getIsNullQuery () {
356357 Query fieldExist = ExistsQuery .of (f -> f
357- .field (this .searchField ))._toQuery ();
358+ .field (this .searchField ))._toQuery ();
358359
359360 return BoolQuery .of (b -> b
360361 .mustNot (fieldExist ))._toQuery ();
@@ -368,8 +369,10 @@ public Query getLikeQuery(String literal) {
368369 .flags ("ALL" )
369370 .value (literal ))._toQuery ();
370371 }
372+
371373 /**
372374 * Given param, find any of those is not a valid CQLCollectionsField
375+ *
373376 * @param args -
374377 * @return Invalid enum
375378 */
@@ -379,8 +382,7 @@ public static List<String> findInvalidEnum(List<String> args) {
379382 try {
380383 CQLFields .valueOf (str );
381384 return false ;
382- }
383- catch (IllegalArgumentException e ) {
385+ } catch (IllegalArgumentException e ) {
384386 return true ;
385387 }
386388 })
0 commit comments