[hibernate-dev] HSearch Projection queries & multiple fields with same name

Sanne Grinovero sanne at hibernate.org
Thu Jan 3 12:18:37 EST 2013


On 3 January 2013 18:11, Emmanuel Bernard <emmanuel at hibernate.org> wrote:
> On Thu 2013-01-03 17:59, Ales Justin wrote:
>> >> I think anything handled by not-Lucene is wrong.
>> >
>> > I'm afraid Lucene won't do it, so we have no option. It's definitely
>> > not designed to do this: even a custom Collector can't return more
>> > results than Documents in its segment, as all representations work by
>> > using int as relative ids.
>>
>> Even if we have Document(s) for every possible combination - all elements of cartesian product?
>> Where current impl basically handles 1 x 1 x 1 x ... x 1.
>> And new HS impl just needs to take this multi Document approach into account.
>
> The problem with this approach is that it will makes things hard for
> most usecase except the one involving associated collections.
> We would need to filter out documents that refer to the same entity
> unless the query ought to be a cartesian one.
> this seems like a wrong thing to do as it would cost us more index size
> and speed as well as make the overall code more complex.
> I'd rather have a transformer cartesianize the end result. That would be
> much cheaper and code localized.

+1, and such transformer would not be able to deal with pagination &
co, but could work fairly well with the ScrollableResults.

Did you consider Teiid on top of the index? Just wondering, as we
talked about it before holidays so I'm assuming you will have Teiid
around anyway.


More information about the hibernate-dev mailing list