SOLR-7472: SortingResponseWriter does not log fl parameters that don't exist.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1679618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joel Bernstein 2015-05-15 18:35:04 +00:00
parent 5e447065a2
commit e1e622b48f
2 changed files with 9 additions and 1 deletions

View File

@ -271,6 +271,8 @@ Bug Fixes
* SOLR-7542: Schema API: Can't remove single dynamic copy field directive
(Steve Rowe)
* SOLR-7472: SortingResponseWriter does not log fl parameters that don't exist. (Joel Bernstein)
Optimizations
----------------------

View File

@ -229,7 +229,13 @@ public class SortingResponseWriter implements QueryResponseWriter {
FieldWriter[] writers = new FieldWriter[fields.length];
for(int i=0; i<fields.length; i++) {
String field = fields[i];
SchemaField schemaField = schema.getField(field);
SchemaField schemaField = null;
try {
schemaField = schema.getField(field);
} catch (Exception e) {
throw new IOException(e);
}
if(!schemaField.hasDocValues()) {
throw new IOException(field+" must have DocValues to use this feature.");