AssertionFailure with providedId in embeddeds

Description

This started after integration of apparently, building the SearchFactory started throwing an exception on Infinispan:

Here's the partial mapping for reference:

We have a SearchConfiguration with isIdProvidedImplicit true

Activity

Show:

Yoann RodièreOctober 27, 2016 at 2:16 PM

Ok, so it seems the bug only happens when building with maven from the command line, never when running the test from inside Eclipse. Probably because of the use of HashMaps in our internal code, which makes the relative order of fields change from one run to another.

Anyway, I think I got the issue: provided IDs were being handled incorrectly for @IndexedEmbeddeds . It turns out it had nothing to do with Elasticsearch after all, and we may currently have issues with the Lucene backend too (for example, provided IDs being erased by an embedded provided ID).
I'll submit a PR soon.

Gustavo FernandesOctober 27, 2016 at 10:32 AM

Here's a reproducer:

Gustavo FernandesOctober 26, 2016 at 4:45 PM

Thanks for looking into this, and apologies for the half-baked mappings. You can find the full domain here https://github.com/infinispan/infinispan/tree/master/query/src/test/java/org/infinispan/query/dsl/embedded/testdomain/hsearch

Yoann RodièreOctober 26, 2016 at 4:39 PM

Well, from your last edit, it seems it was a typo. Then I guess we need a more extensive mapping, because this mapping doesn't show the issue. Do you think you could provide more?
Other attributes in Address (especially embeddeds) would help, in particular.

Yoann RodièreOctober 26, 2016 at 4:34 PM

Hi ,

Thanks for your report. I could not reproduce the issue with the given mapping. Could you please provide the code for the AddressHS class?
Also, could you confirm the bug is still here with the most recent merges?

If you want to contribute a test case, here's the work I started on the test case: https://github.com/yrodiere/hibernate-search/tree/HSEARCH-2433

Thank you,
Yoann

Fixed

Details

Assignee

Reporter

Components

Priority

Created October 26, 2016 at 2:38 PM
Updated November 29, 2016 at 1:06 AM
Resolved October 31, 2016 at 11:43 AM