From ffbdf0b882573b303a155ab3e6a4588c7981a38c Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Thu, 5 May 2005 22:41:44 +0000 Subject: [PATCH] test using a non-existing field as first sort key git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@168453 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/org/apache/lucene/search/TestSort.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/org/apache/lucene/search/TestSort.java b/src/test/org/apache/lucene/search/TestSort.java index b0f979b5542..cd3419d0f71 100644 --- a/src/test/org/apache/lucene/search/TestSort.java +++ b/src/test/org/apache/lucene/search/TestSort.java @@ -260,6 +260,11 @@ implements Serializable { sort.setSort ("float"); assertMatches (full, queryF, sort, "ZJI"); + // using a nonexisting field as first sort key shouldn't make a difference: + sort.setSort (new SortField[] { new SortField ("nosuchfield", SortField.STRING), + new SortField ("float") }); + assertMatches (full, queryF, sort, "ZJI"); + sort.setSort ("float", true); assertMatches (full, queryF, sort, "IJZ"); }