SOLR-6692: Highlighter NPE bugfix when highlight nonexistent field.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1673281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David Wayne Smiley 2015-04-13 21:11:40 +00:00
parent 0c32d78135
commit f295b3a890
1 changed files with 3 additions and 3 deletions

View File

@ -450,7 +450,7 @@ public class DefaultSolrHighlighter extends SolrHighlighter implements PluginInf
final int mvToExamine =
req.getParams().getFieldInt(fieldName, HighlightParams.MAX_MULTIVALUED_TO_EXAMINE,
schemaField.multiValued() ? Integer.MAX_VALUE : 1);
(schemaField != null && schemaField.multiValued()) ? Integer.MAX_VALUE : 1);
// Technically this is the max *fragments* (snippets), not max values:
int mvToMatch =
req.getParams().getFieldInt(fieldName, HighlightParams.MAX_MULTIVALUED_TO_MATCH, Integer.MAX_VALUE);