I am running Elasticsearch 5.6 with hibernate search 5.10.3 Final, and what I’ve noticed that each update to an indexed entity causes 3 index updates… is it somehow configuration related, wrong mapping or is just a bug?
here are the logs which I can see after I activate the debug with org.hibernate.search.elasticsearch.request org.hibernate.search.fulltext_query
.
10:54:29,780 DEBUG [com.company.MyEntity.data.impl.interceptor.MyEntityChangeInterceptor] (default task-1) MyEntityChangeInterceptor: try to find the differences, 'MyEntity'
10:54:29,951 INFO [com.company.MyEntity.data.impl.interceptor.MyEntityChangeInterceptor] (default task-1) MyEntityChangeInterceptor: entity class: MyEntity , changes found, '{owner=owner is changed from - to UserName: saif(xx)}'
10:54:30,114 TRACE [org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization] (default task-1) Processing Transaction's beforeCompletion() phase: org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization@65616985
10:54:30,114 TRACE [org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization] (default task-1) Processing Transaction's beforeCompletion() phase: org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization@65616985
10:54:30,119 TRACE [org.hibernate.search.spi.impl.TypeHierarchy] (default task-1) Targeted indexed classes for [com.company.MyEntity.data.entities.MyEntity]: [com.company.MyEntity.data.entities.MyEntity]
10:54:30,119 TRACE [org.hibernate.search.spi.impl.TypeHierarchy] (default task-1) Targeted indexed classes for [com.company.MyEntity.data.entities.MyEntity]: [com.company.MyEntity.data.entities.MyEntity]
10:54:30,131 TRACE [org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization] (default task-1) Transaction's beforeCompletion() phase already been processed, ignoring: org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization@65616985
10:54:30,131 TRACE [org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization] (default task-1) Transaction's beforeCompletion() phase already been processed, ignoring: org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization@65616985
10:54:30,196 TRACE [org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization] (default task-1) Processing Transaction's afterCompletion() phase for org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization@65616985. Performing work.
10:54:30,196 TRACE [org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization] (default task-1) Processing Transaction's afterCompletion() phase for org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization@65616985. Performing work.
10:54:30,198 TRACE [org.hibernate.search.backend.impl.BatchedQueueingProcessor] (default task-1) Lucene WorkQueue to send to backends:[
UpdateLuceneWork: com.company.MyEntity.data.entities.MyEntity#000000
]
10:54:30,198 TRACE [org.hibernate.search.backend.impl.BatchedQueueingProcessor] (default task-1) Lucene WorkQueue to send to backends:[
UpdateLuceneWork: com.company.MyEntity.data.entities.MyEntity#000000
]
10:54:30,231 TRACE [org.hibernate.search.elasticsearch.processor.impl.ElasticsearchWorkProcessor] (Hibernate Search: Elasticsearch non-stream work orchestrator for index MyEntity-index-v2.15) Processing IndexWork[path = /MyEntity-index-v2.15/com.company.MyEntity.data.entities.MyEntity/000000, dirtiedIndexName = MyEntity-index-v2.15]
10:54:30,231 TRACE [org.hibernate.search.elasticsearch.processor.impl.ElasticsearchWorkProcessor] (Hibernate Search: Elasticsearch non-stream work orchestrator for index MyEntity-index-v2.15) Processing IndexWork[path = /MyEntity-index-v2.15/com.company.MyEntity.data.entities.MyEntity/000000, dirtiedIndexName = MyEntity-index-v2.15]
10:54:30,302 DEBUG [com.company.MyEntity.data.impl.repositories.MyEntityRepoBean] (default task-1) getting MyEntity by id=000000
10:54:30,400 TRACE [org.hibernate.search.elasticsearch.request] (Hibernate Search: Elasticsearch transport thread-3) HSEARCH400093: Executed Elasticsearch HTTP PUT request to path '/MyEntity-index-v2.15/com.company.MyEntity.data.entities.MyEntity/000000' with query parameters {} in 157ms. Response had status 200 'OK'. Request body:
10:54:30,400 TRACE [org.hibernate.search.elasticsearch.request] (Hibernate Search: Elasticsearch transport thread-3) HSEARCH400093: Executed Elasticsearch HTTP PUT request to path '/MyEntity-index-v2.15/com.company.MyEntity.data.entities.MyEntity/000000' with query parameters {} in 157ms. Response had status 200 'OK'. Request body: <
10:54:30,400 TRACE [org.hibernate.search.elasticsearch.request] (Hibernate Search: Elasticsearch transport thread-3) HSEARCH400093: Executed Elasticsearch HTTP PUT request to path '/MyEntity-index-v2.15/com.company.MyEntity.data.entities.MyEntity/000000' with query parameters {} in 157ms. Response had status 200 'OK'. Request body: <