Skip to content

Commit

Permalink
spotlessAapply
Browse files Browse the repository at this point in the history
  • Loading branch information
gashutos committed Sep 14, 2023
1 parent 18c4811 commit 8d41d55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public Sort buildIndexSort(
if (fieldData == null) {
throw new IllegalArgumentException("docvalues not found for index sort field:[" + sortSpec.field + "]");
}
if(shouldWidenIndexSortTpe == true) {
if (shouldWidenIndexSortTpe == true) {
sortFields[i] = fieldData.indexSortField(sortSpec.missingValue, mode, null, reverse);
} else {
sortFields[i] = fieldData.sortField(sortSpec.missingValue, mode, null, reverse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
package org.opensearch.index.engine;

import org.apache.logging.log4j.Logger;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortField;
import org.apache.lucene.document.LongPoint;
import org.apache.lucene.document.NumericDocValuesField;
import org.apache.lucene.index.DirectoryReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public final SortField sortField(
: SortedNumericSelector.Type.MIN;
SortField sortField = new SortedNumericSortField(getFieldName(), getNumericType().sortFieldType, reverse, selectorType);
sortField.setMissingValue(source.missingObject(missingValue, reverse));
if(getNumericType().usePointBasedOptimization == false) {
if (getNumericType().usePointBasedOptimization == false) {
sortField.setOptimizeSortWithPoints(false);
}
return sortField;
Expand All @@ -165,7 +165,7 @@ public final SortField sortField(Object missingValue, MultiValueMode sortMode, N

@Override
public final SortField indexSortField(Object missingValue, MultiValueMode sortMode, Nested nested, boolean reverse) {
switch(getNumericType().sortFieldType) {
switch (getNumericType().sortFieldType) {
case INT:
getNumericType().setSortFieldType(NumericType.LONG.sortFieldType);
break;
Expand Down Expand Up @@ -242,7 +242,7 @@ private XFieldComparatorSource comparatorSource(
source = new LongValuesComparatorSource(this, missingValue, sortMode, nested);
break;
default:
if(getNumericType().sortFieldType == SortField.Type.LONG) {
if (getNumericType().sortFieldType == SortField.Type.LONG) {
return new LongValuesComparatorSource(this, missingValue, sortMode, nested);
}
assert !targetNumericType.isFloatingPoint();
Expand Down

0 comments on commit 8d41d55

Please sign in to comment.