On 5 August 2013 16:57, Guillaume Smet <guillaume.smet(a)gmail.com> wrote:
On Mon, Aug 5, 2013 at 5:37 PM, Sanne Grinovero
<sanne(a)hibernate.org> wrote:
> I understand my code, but I'm not sure I understood why you would need this?
Instead of calling the mass indexer directly for all our classes, we
get the root indexed types and we index them one by one using the mass
indexer.
This is the only way to keep the number of database connections
sufficiently low for the constraints of a few customers of us with a
lot of entities and restrictions on the number of database connections
allowed.
At the moment, we just copied the toRootEntities code from the mass
indexer to do so.
See
https://hibernate.atlassian.net/browse/HSEARCH-598 .
So we actually would be better off fixing that issue, rather than
polluting the metadata API with hard to explain methods.
Fixing the issue in its entirety is very complex, but what would you
think of having an option to run the MassIndexer in sequence across
multiple indexe (root) types?
If I understood correctly, that would make the strategy you're already
using since a while available to everyone.
How does that sound?
--Sanne
>> Ok, I see. Could you create a Jira issue for that. I think we need to discuss
this also a bit more.
>
> +1
I'm not sure we agree it's something useful, do we?
>> 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.
Indeed.
--
Guillaume