| Closing this ticket as there is actually a way to use LuceneWork/Work. It's not documented, as are much of our SPIs, but it exists. After quite a bit of digging... We actually offer SPIs to convert a Class<?> to an IndexedTypeIdentifier, though it's well hidden. You need to do something like this:
searchIntegrator.getIndexBindings().keyFromPojoType( myClass );
I updated the migration guide accordingly (changes might take a few minutes to show up). By the way Carsten Hammer, the deletion query does not take polymorphism into account, so if you need to apply the delete to all subtypes, you might want to also use org.hibernate.search.engine.integration.impl.ExtendedSearchIntegrator#getIndexedTypesPolymorphic and create one query by indexed subtype. As Sanne already mentioned, we really need a proper API for deletion queries, so I created a ticket: HSEARCH-3106 Open |