From 5d7ef8f58578931cad9490300cc918d951b8306e Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Wed, 31 Oct 2012 08:48:00 -0400 Subject: [PATCH] lucene4: fixed SortParseElement --- .../elasticsearch/search/sort/SortParseElement.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/elasticsearch/search/sort/SortParseElement.java b/src/main/java/org/elasticsearch/search/sort/SortParseElement.java index eb72e40c023..d9a1b27622d 100644 --- a/src/main/java/org/elasticsearch/search/sort/SortParseElement.java +++ b/src/main/java/org/elasticsearch/search/sort/SortParseElement.java @@ -37,10 +37,10 @@ import java.util.List; */ public class SortParseElement implements SearchParseElement { - private static final SortField SORT_SCORE = new SortField(null, SortField.SCORE); - private static final SortField SORT_SCORE_REVERSE = new SortField(null, SortField.SCORE, true); - private static final SortField SORT_DOC = new SortField(null, SortField.DOC); - private static final SortField SORT_DOC_REVERSE = new SortField(null, SortField.DOC, true); + private static final SortField SORT_SCORE = new SortField(null, SortField.Type.SCORE); + private static final SortField SORT_SCORE_REVERSE = new SortField(null, SortField.Type.SCORE, true); + private static final SortField SORT_DOC = new SortField(null, SortField.Type.DOC); + private static final SortField SORT_DOC_REVERSE = new SortField(null, SortField.Type.DOC, true); public static final String SCORE_FIELD_NAME = "_score"; public static final String DOC_FIELD_NAME = "_doc"; @@ -82,7 +82,7 @@ public class SortParseElement implements SearchParseElement { sort = true; } else { SortField sortField = sortFields.get(0); - if (sortField.getType() == SortField.SCORE && !sortField.getReverse()) { + if (sortField.getType() == SortField.Type.SCORE && !sortField.getReverse()) { sort = false; } else { sort = true;