New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISPN-11129 High Availability for non-shared indexes on DIST caches #7792
ISPN-11129 High Availability for non-shared indexes on DIST caches #7792
Conversation
This should not prevent you from merging this PR at all, but I was wondering: in Hibernate Search 6, you might want to do the "segment id" filtering in a more transparent fashion? In Elasticsearch, there is the concept of "routing". Essentially a routing key is similar to your concept of segment ID. Out of the top of my head, here are the changes we would need in Hibernate Search 6. They're actually quite reasonable:
|
Certainly, but as this fix is supposed to be supported in HSearch 5 (we are going to backport it to Infinispan 10.1), it was done with what HSearch 5 supported. |
Sure. I was just fishing to see if it makes sense to work on it in Search 6. Created HSEARCH-3824. |
The requirements for this extra field is:
I am not familiar with the routing field, would it be able to do al the above? |
It'll be a string field, but as far as I can see that's already what you are using.
That can be done in Search 6 by applying a custom
Yep.
This is not currently exposed, but I suppose we can add it. Do you mean delete all entries for a given list of segments, or all entries with a given ID in a given list of segments? |
Delete all entries for a given list of segments for sure, but I will know better soon if any other deletion is required. Regarding HSearch 5, is it currently doable to delete by query on this field I added in this PR? EDIT: I can probably use |
In both Search 5 and 6 you can do a purge to delete all documents of the index. I suppose this is not enough for you. If you need to delete all documents for a given list of segments, then your only solution right now in Hibernate Search 5 is to use an experimental SPI: We haven't restored this SPI in Search 6 yet: HSEARCH-3304 |
Regarding DeleteByQuery support in Hibernate Search 5, I found some issues. It fails saying that my custom segment field is not mapped, when I tried using I tried to extend public static boolean isSupported(Class<? extends DeletionQuery> type) {
if ( SingularTermDeletionQuery.class == type ) {
return true;
}
return false;
} Is there a workaround for it? EDIT: Maybe get hold of the IndexManager or IndexWriter? The other minor issue is that the Work SPI is a per-entity-type, so I need to go through |
Maybe try to use
I'm not sure you can get hold of the IndexWriter directly? At least that seems dangerous. |
b5a986a
to
6e8f640
Compare
Merged |
https://issues.redhat.com/browse/ISPN-11129