Regression? Projection on single property sometimes returns value other times array

Description

This looks like something that was reported before (HSEARCH-1786) and was fixed. I'm getting some unexpected results when projecting on embedded values. It looks like in some cases if you project on a single value, instead of an array with the value, you get the value itself directly.

I can't entirely put my finger on it. but 5.1.0.Final works fine. I'll have a further look later.

Activity

Yoann RodièreMay 25, 2020 at 4:42 PM

Closing since this seems to be caused by a user error, and is unlikely to be reproduced in Search 6 since projections have been revamped.

Related: support for projections on multi-valued fields will be added in

Sanne GrinoveroMay 15, 2015 at 9:31 PM

That sounds ok, thanks for taking a closer look! So you think we can close this?

Marc SchipperheynMay 15, 2015 at 9:10 PM
Edited

I reported an issue earlier where in a ResultTransformer, the transformList function is not called. This is now apparently fixed. And because I already had an implementation for this, I now started seeing this issue here.

So, I used the transformTuple to transform the tuple array to a single object. That then got supplied to the transformList. I had implemented it in such a way as to expect a list of tuple arrays, but I had misunderstood how it was supposed to work, as it now supplied the list of transformed objects in stead of the original arrays. Hence my confusion.

Marc SchipperheynMay 15, 2015 at 11:58 AM

Yes, for one example I'm sure that it is NumericField. I have time to look at this some more later today and I will see if this only occurs w NumericFields.

Sanne GrinoveroMay 14, 2015 at 7:39 PM

Hi Marc, an example to reproduce this would be very useful.
I'm pretty sure we only ever load a single value, this is in fact something I've been discussing this week with as for Hibernate OGM needs we'd like to consider starting to properly re-incarnate the original collection.

Are you possibly projecting some field encoded as NumericField ?

Cannot Reproduce

Details

Assignee

Reporter

Affects versions

Priority

Created May 14, 2015 at 6:53 PM
Updated May 25, 2020 at 4:42 PM
Resolved May 25, 2020 at 4:42 PM