Support for only manual indexing of particular entity types
Activity
Hardy Ferentschik December 10, 2014 at 11:10 AM
What about the MassIndexer ? I think it should be able to reindex entities which are set to "manual" too, but I wonder if that's the general sentiment.
From the interceptor docs:
The interceptor is applied to a MassIndexer operation, but is ignored when using the explicit indexing control API such org.hibernate.search.FullTextSession.index(T) or purge and purgeAll
Hardy Ferentschik December 5, 2014 at 2:50 PM
As far as I can tell we are covered.
Sanne Grinovero November 10, 2014 at 6:15 PMEdited
Could you verify that using an `EntityIndexingInterceptor` as an alternative actually works for this purpose?
We'd need to add a test to guarantee that such an interceptor wouldn't also block the behaviour for an invocation of org.hibernate.search.FullTextSession.index(T)
.
What about the MassIndexer
? I think it should be able to reindex entities which are set to "manual" too, but I wonder if that's the general sentiment.
Hardy Ferentschik November 5, 2014 at 11:39 AM
Is this not a use case for an EntityIndexingInterceptor
? The question is whether or not to provide something like a ManualIndexingOnly
interceptor out of the box?
Not sure whether I like the flag option. The problem I see there is that the properties configuration is index manager/index name based. Settings are applied to indexes which is not the same as the entity centric "do only index entity X manually". In many/most cases index mananger/name maps one to one to an entity, but that does not have to be the case.
I'd either resolve this issue without any code changes referring to EntityIndexingInterceptor
as a solution to implement this use case or I'd go one step further an provide a interceptor for this use-case out of the box.
I have an interesting use case. Basically I have to find internal duplicates (in full text search terms) among a bunch of entities of a particular type. The most elegant way to do it, would be:
1. Not to index those entities when they are saved (the problem is that only a minority of entities need to be de-duped).
2. Before de-duping process starts, manually index those particular entities.
3. De-dupe them using Lucene's capabilities.
4. Purge those entities from the index.
Is it possible to mark a particular entity to be indexed only manually?
seems to be a global configuration. Can it be applied somehow on a per entity basis? If not, I think this is a valuable RFE.