Skip to content

Commit

Permalink
HSEARCH-2434 When validating Elasticsearch schemas, use "default" as …
Browse files Browse the repository at this point in the history
…a default value for analyzer references

Because this is what Elasticsearch implies when it doesn't display the
analyzer attribute in retrieved mappings. It used not to matter on ES2,
because ES always displayed the analyzer attribute, but on ES5 it is no
longer the case.
  • Loading branch information
yrodiere committed Mar 21, 2017
1 parent 33e147e commit 727d806
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ public void validate(ValidationErrorCollector errorCollector, PropertyMapping ex
validateJsonPrimitive( errorCollector, expectedMapping.getType(), "null_value",
expectedMapping.getNullValue(), actualMapping.getNullValue() );

validateEqualWithDefault( errorCollector, "analyzer", expectedMapping.getAnalyzer(), actualMapping.getAnalyzer(), null );
validateEqualWithDefault( errorCollector, "analyzer", expectedMapping.getAnalyzer(), actualMapping.getAnalyzer(), "default" );

super.validate( errorCollector, expectedMapping, actualMapping );

Expand Down

0 comments on commit 727d806

Please sign in to comment.