|
I am using Hibernate-Search as my Lucene Integration in my project and I want to be able to use it without having a real underlying JPA entity architecture.
Indexing and searching on these Non-JPA entities already works like a charm but now I can only delete by ID. And as I am using Lucene as kind of a enhanced version of the data in my database but without having a database equivalent I can't efficiently delete them one by one.
I know I could query all Lucene documents matching my query and then delete them one by one by their ID but that would be quite cumbersome and slow.
I have written some extension classes that allow for deleteByQuery(...)-like behaviour here:
https://github.com/s4ke/hibernate-search/compare/deleteByQuery?expand=1
What do you think about this (tests are included)?
|