On 5 August 2013 15:56, Hardy Ferentschik <ha...@hibernate.org> wrote:
>
> On 5 Jan 2013, at 3:44 PM, Guillaume Smet <guillaume.s...@gmail.com> wrote:
>
>> (Hardy, sorry for the double post, forgot the list)
>>
>> On Mon, Aug 5, 2013 at 3:20 PM, Hardy Ferentschik <ha...@hibernate.org> 
>> wrote:
>>> TBH i am not completely sure I understand what the method does. The docs 
>>> says:
>>>
>>> "From the set of classes a new set is built containing all indexed 
>>> subclasses, but removing then all subtypes of
>>> indexed entities."
>>>
>>> Not sure what exactly that means. What are you using this method for? Maybe 
>>> you could
>>> provide a use case.
>>
>> Well, we use it for our mass indexing magic button to index one class
>> at a time. Otherwise the mass indexer requires too many db connections
>> when we have too many entities: there are a couple of forum posts and
>> JIRA issues about this problem.
>>
>> The purpose of the "rootification" done in the mass indexer is that if you 
>> have:
>> Vehicle > Car
>>> Truck
>> Animal > Cat
>>> Dog
>> the toRootEntities only returns Vehicle and Animal so that you can
>> send them to the mass indexer machinery. Otherwise, you will reindex
>> Car, Truck, Cat and Dog 2 times (one time when you deal with the
>> parent class and one time when you deal with the child one).

I understand my code, but I'm not sure I understood why you would need this?

> Ok, I see. Could you create a Jira issue for that. I think we need to discuss 
> this also a bit more.

+1

> This looks more like a ORM optimisation thing than a Search specific thing. 
> Technically
> Vehicle and Animal are not indexed types. Car, Truck, Dog and Cat are. At 
> least that is my
> initial thinking. I'll need to think a bit more ago about this one.

Don't assume that Vehicle and Animal are abstract. They could all be
indexed types, still you don't want to process them twice during
indexing.

Sanne

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

Reply via email to