SOLR-2302 -- only show an error if neither a field name nor a field type are sent

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1053578 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2010-12-29 09:28:31 +00:00
parent 54f984cf50
commit a3e1ede9bd
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ public class FieldAnalysisRequest extends SolrRequest {
*/
@Override
public FieldAnalysisResponse process(SolrServer server) throws SolrServerException, IOException {
if (fieldTypes == null || fieldNames == null) {
throw new IllegalStateException("A list one field type or field name need to be specified");
if (fieldTypes == null && fieldNames == null) {
throw new IllegalStateException("At least one field type or field name need to be specified");
}
if (fieldValue == null) {
throw new IllegalStateException("The field value must be set");