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
This commit is contained in:
Daniel Naber 2005-05-05 22:41:44 +00:00
parent 12a91b4395
commit ffbdf0b882
1 changed files with 5 additions and 0 deletions

View File

@ -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");
}