From 4e81c2c56212a18dafd89af50dd93418ee92b175 Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Sun, 4 Apr 2004 15:47:31 +0000 Subject: [PATCH] reverse misunderstanding - now just simply denote the reverse flag rather than interpret ascending or descending. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150279 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/search/SortField.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/lucene/search/SortField.java b/src/java/org/apache/lucene/search/SortField.java index 4c249066a52..1ca5b19578e 100644 --- a/src/java/org/apache/lucene/search/SortField.java +++ b/src/java/org/apache/lucene/search/SortField.java @@ -146,8 +146,9 @@ implements Serializable { default: buffer.append("\"" + field + "\""); break; } - - buffer.append(reverse ? " DESC" : " ASC"); + + if (reverse) + buffer.append('!'); return buffer.toString(); }