Really? I would argue differently. 

Let's take the blog example where I only want to index blog entries which are 
published. Adding the interceptor and relying on automatic indexing will not 
index un-published entries. Great.
If I, however, want/ have to re-index my blog entries via the API  the 
interceptor does not apply? Why?

IMO the interceptor has to apply for automatic index updates as well as 
explicit index request. Conceptually
(for a user) there is no difference between explicitly calling 
FulltextSession#index or auto-indexing. That's 
exactly the type of confusion the user on the forum experienced. 

I think we should change this behavior.

--Hardy

On May 11, 2012, at 5:23 PM, Sanne Grinovero wrote:

> As a user if I were asking to Search *explicitly* to index my entity,
> I would not be pleased in the framework to override my request... I
> think the code is correct, maybe it's worth pointing this out at least
> on #index() javadoc?
> 
> Sanne
> 
> On 11 May 2012 14:48, Hardy Ferentschik <ha...@ferentschik.de> wrote:
>> Hi,
>> 
>> quick question regarding the indexing interceptor. Why is WorkType.Index 
>> mapped to IndexingOverride.APPLY_DEFAULT -
>> https://github.com/hferentschik/hibernate-search/blob/master/hibernate-search-engine/src/main/java/org/hibernate/search/backend/impl/TransactionalWorker.java#L132
>> 
>> Shouldn't it be the same as ADD? Am I missing something? I am asking, 
>> because of https://forum.hibernate.org/viewtopic.php?f=9&t=1015173
>> 
>> --Hardy


_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to