Make exception message more descriptive
Exception message should be more descriptive about what to do when inner_hit names colides. Fixes https://github.com/elastic/elasticsearch/issues/19142
This commit is contained in:
parent
f6b166f19e
commit
8e8614483b
|
@ -80,7 +80,7 @@ public final class InnerHitsContext {
|
|||
public void addInnerHitDefinition(BaseInnerHits innerHit) {
|
||||
if (innerHits.containsKey(innerHit.getName())) {
|
||||
throw new IllegalArgumentException("inner_hit definition with the name [" + innerHit.getName() +
|
||||
"] already exists. Use a different inner_hit name");
|
||||
"] already exists. Use a different inner_hit name or define one explicitly");
|
||||
}
|
||||
|
||||
innerHits.put(innerHit.getName(), innerHit);
|
||||
|
|
Loading…
Reference in New Issue