| Hi Sanne, 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:
@Entity
@Table
@Indexed
public class Record {
@IndexedEmbedded(prefix="customField_", includeEmbeddedObjectId = true)
private Set<RecordTypeCustomFieldValue> customFieldValues;
....
}
@Entity
@Table
public class RecordTypeCustomFieldValue{
.....
}
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:
FullTextSession fullTextSession = Search.getFullTextSession(session);
fullTextSession.createIndexer(
.....
Record.class,
....
RecordCheckListCustomFieldValue.class,
...)
.cacheMode(IGNORE)
.purgeAllOnStart(true)
.optimizeAfterPurge(true)
.optimizeOnFinish(true)
.threadsToLoadObjects(loaderThreads)
.typesToIndexInParallel(indexerThreads)
.start();
When index for the Record type is created it fails because it doesn't know about RecordCheckListCustomFieldValue data type. Hope that will help. Thanks, Alex |