At the moment org.hibernate.search.elasticsearch.impl.ElasticsearchIndexManager#createIndexMappings dynamic setting is set to strinct and there is no way to change it (apart from setting elasticsearch.index_schema_management_strategy=NONE (which was default for 5.6.0.Beta2) and then dynamic setting defaults to true, which what i need).
I think it whould be benefitial to have all options available for dynamic mappings
Note (): Some tests have been disabled because of this lack of support. Please search for this ticket's code (HSEARCH-2387) in the source and re-enabled them when this issue has been fixed.
Hi Alex, thanks for the feedback! Seems a reasonable request. Would you be able to tell us more about your use case?
thanks for quick reply.
We are trying to move away from Infinispan indexes storage to ES thus I am migrating to 5.6.0.Beta3.
Example of entities:
Upon the first application startup when no indexes and mappings exists at ES side yet org.hibernate.search.elasticsearch.impl.ElasticsearchIndexManager#createIndexMappings is triggered because default schema management strategy is set to org.hibernate.search.elasticsearch.cfg.IndexSchemaManagementStrategy#CREATE so it creates mappings with strict parameter.
Then I perform full reindexing:
When index for the Record type is created it fails because it doesn't know about RecordCheckListCustomFieldValue data type.
Hope that will help.
To be honest, full support for IndexedEmbeddeds on Elasticsearch is still work in progress (). Does your issue disappear when you drop the prefix="customField_", in your @IndexedEmbedded annotation?
If so, you probably won't need a dynamic mapping once we fully support IndexedEmbeddeds (which will be the case in the 5.6 release).
If not, would you mind sharing the full stacktrace with the error message from Elasticsearch?
Note that I don't mean to dismiss your proposal. Allowing users to configure the "dynamic" attribute is probably useful, but I'd like to make sure the need for this feature doesn't stem from bugs, which we'd rather fix first.
The issue disappeared when i removed prefix="customField_", in my @IndexedEmbedded annotation.
Do you know when 5.6 will be released?
Doesn't look like beta3 is fully production ready at this point, so we would probably wait for 5.6 final release....
We're currently aiming at publishing a candidate release by the end of the month. Then the time to the release will mostly depend on the feedback from the community.
Be aware, though, that even when the release will be out, it will sport experimental Elasticsearch integration. Full support is more likely to come with Hibernate Search 6.0, which has no expected release date yet. You can refer to the roadmap for details about the content of each version: http://hibernate.org/search/roadmap/