From 63161f862a4f3ee5d3b0a822b924187b60ac64e6 Mon Sep 17 00:00:00 2001 From: gashutos Date: Thu, 14 Sep 2023 12:10:22 +0530 Subject: [PATCH] Index sort print --- .../index/fielddata/IndexNumericFieldData.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java index 025a1f719f547..aecc2e00894cf 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java @@ -69,7 +69,7 @@ public enum NumericType { BOOLEAN(false, SortField.Type.INT, CoreValuesSourceType.BOOLEAN), BYTE(false, SortField.Type.INT, CoreValuesSourceType.NUMERIC), SHORT(false, SortField.Type.INT, CoreValuesSourceType.NUMERIC), - INT(false, SortField.Type.INT, CoreValuesSourceType.NUMERIC), + INT(false, SortField.Type.LONG, CoreValuesSourceType.NUMERIC), LONG(false, SortField.Type.LONG, CoreValuesSourceType.NUMERIC), DATE(false, SortField.Type.LONG, CoreValuesSourceType.DATE), DATE_NANOSECONDS(false, SortField.Type.LONG, CoreValuesSourceType.DATE), @@ -160,7 +160,7 @@ public final SortField sortField(Object missingValue, MultiValueMode sortMode, N @Override public final SortField indexSortField(Object missingValue, MultiValueMode sortMode, Nested nested, boolean reverse) { - getNumericType().modifySortFieldTypeForIndexSortIfNeeded(); + //getNumericType().modifySortFieldTypeForIndexSortIfNeeded(); return sortField(getNumericType(), missingValue, sortMode, nested, reverse); } @@ -221,11 +221,11 @@ private XFieldComparatorSource comparatorSource( return dateComparatorSource(missingValue, sortMode, nested); case DATE_NANOSECONDS: return dateNanosComparatorSource(missingValue, sortMode, nested); - case LONG: + /*case LONG: System.out.println("CHETAN logs LONG"); - return new LongValuesComparatorSource(this, missingValue, sortMode, nested); + return new LongValuesComparatorSource(this, missingValue, sortMode, nested);*/ default: - System.out.println("CHETAN logs INT" + targetNumericType); + System.out.println("CHETAN logs " + targetNumericType); assert !targetNumericType.isFloatingPoint(); return new IntValuesComparatorSource(this, missingValue, sortMode, nested); }