Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiOWY5ZTZk...
) / Task (
https://hibernate.atlassian.net/browse/HSEARCH-3902?atlOrigin=eyJpIjoiOWY...
) HSEARCH-3902 (
https://hibernate.atlassian.net/browse/HSEARCH-3902?atlOrigin=eyJpIjoiOWY...
) Expose addOrUpdate/delete/purge on IndexIndexer/PojoIndexer (
https://hibernate.atlassian.net/browse/HSEARCH-3902?atlOrigin=eyJpIjoiOWY...
)
Change By: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
This is only about SPIs, no new feature will be directly exposed as a result of this
ticket.
First, we need to expose addOrUpdate on the PojoIndexer if we want to implement a mass
indexer that works correctly with concurrent updates. We need this in Infinispan in
particular.
Second, in Infinispan, indexing operations are always about a single entity/document, and
contained types are irrelevant. Also, there is no concept of session, so the session is
implemented as a singleton.
Thus indexing in Infinispan does not need the PojoIndexingPlan and its overhead;
Infinispan could use the PojoIndexer directly, if only it exposed the missing operations
(addOrUpdate/delete/purge).
Ideally, we should also make the PojoIndexer and IndexIndexers thread-safe, so that
Infinispan can use them as singletons. This means in particular fixing the lazy
initialization we currently have in PojoIndexer. Maybe we should make the PojoIndexer
type-scoped and initialize its delegates eagerly? That certainly wouldn't be a problem
for the MassIndexer.
Finally, we'd also need to support DocumentCommitStrategy/DocumentRefreshStrategy in
PojoIndexer/IndexIndexer operations. It's quite possible that Infinispan will need to
force commit for each write in some situations, however bad performance will be. Maybe
we'll be able to improve on that by adding
DocumentCommitStrategy.WAIT_FOR/DocumentRefreshStrategy.WAIT_FOR, in another PR.
(
https://hibernate.atlassian.net/browse/HSEARCH-3902#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-3902#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=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:29f7b81 )