mirror of https://github.com/apache/lucene.git
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:
parent
54f984cf50
commit
a3e1ede9bd
|
@ -96,8 +96,8 @@ public class FieldAnalysisRequest extends SolrRequest {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public FieldAnalysisResponse process(SolrServer server) throws SolrServerException, IOException {
|
public FieldAnalysisResponse process(SolrServer server) throws SolrServerException, IOException {
|
||||||
if (fieldTypes == null || fieldNames == null) {
|
if (fieldTypes == null && fieldNames == null) {
|
||||||
throw new IllegalStateException("A list one field type or field name need to be specified");
|
throw new IllegalStateException("At least one field type or field name need to be specified");
|
||||||
}
|
}
|
||||||
if (fieldValue == null) {
|
if (fieldValue == null) {
|
||||||
throw new IllegalStateException("The field value must be set");
|
throw new IllegalStateException("The field value must be set");
|
||||||
|
|
Loading…
Reference in New Issue