[JIRA] (HSEARCH-3960) Validation failure messages should mention that they are related to Elasticsearch schema validation
by Yoann Rodière (JIRA)
Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *created* an issue
Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMThmM2Mw... ) / Improvement ( https://hibernate.atlassian.net/browse/HSEARCH-3960?atlOrigin=eyJpIjoiMTh... ) HSEARCH-3960 ( https://hibernate.atlassian.net/browse/HSEARCH-3960?atlOrigin=eyJpIjoiMTh... ) Validation failure messages should mention that they are related to Elasticsearch schema validation ( https://hibernate.atlassian.net/browse/HSEARCH-3960?atlOrigin=eyJpIjoiMTh... )
Issue Type: Improvement Affects Versions: 6.0.0.Beta8 Assignee: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) Components: backend-elasticsearch Created: 30/Jun/2020 04:32 AM Fix Versions: 6.0.0.Beta9 Priority: Major Reporter: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
Currently the failures only mention the type, field, etc., but never mention that they are related to automatic schema validation, which is kind of confusing (e.g. here ( https://discourse.hibernate.org/t/hsearch400590-request-exceeded-the-time... ) )
Hibernate ORM mapping:
type 'com.hibernate.example.crudapi.model.Employee':
alias 'tbl_employee-write':
attribute 'is_write_index':
failures:
- Invalid value. Expected 'true', actual is 'null'
alias 'tbl_employee':
failures:
- Missing alias
attribute 'dynamic':
failures:
- Invalid value. Expected 'STRICT', actual is 'null'
field '_entity_type':
failures:
- Missing property mapping
field 'department':
attribute 'type':
failures:
- Invalid value. Expected 'keyword', actual is 'text'
field 'dob':
attribute 'type':
failures:
- Invalid value. Expected 'keyword', actual is 'text'
field 'gender':
attribute 'type':
failures:
- Invalid value. Expected 'keyword', actual is 'text'
field 'id':
attribute 'type':
failures:
- Invalid value. Expected 'integer', actual is 'long'
field 'name':
attribute 'type':
failures:
- Invalid value. Expected 'keyword', actual is 'text'
We should probably insert a context element below "type", something like this:
Hibernate ORM mapping:
type 'com.hibernate.example.crudapi.model.Employee':
validation of the existing schema for index 'employee' in the Elasticsearch cluster failed:
alias 'tbl_employee-write':
attribute 'is_write_index':
failures:
- Invalid value. Expected 'true', actual is 'null'
Alternatively, we could insert a failure message before anything else:
Hibernate ORM mapping:
type 'com.hibernate.example.crudapi.model.Employee':
failures:
- Validation of the existing schema for index 'employee' in the Elasticsearch cluster failed. See below for details.
alias 'tbl_employee-write':
attribute 'is_write_index':
failures:
- Invalid value. Expected 'true', actual is 'null'
( https://hibernate.atlassian.net/browse/HSEARCH-3960#add-comment?atlOrigin... ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3960#add-comment?atlOrigin... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100130- sha1:febe453 )
4 years, 6 months