Avro Serializer does not preserve value of field's term vector when it is set to YES

Description

Hello,

When serializing / deserializing an AddLuceneWork with the Avro serializer on a document containing a field type with term vector = YES, the resulting field type is not equal to the original one: the storeTermVectorPayloads attribute is set to true but was originally false.

Attached is the org.hibernate.search.test.serialization.SerializationTest unit test taken from github where I added a new field

When used in a real-life scenario (like JMS replication), this leads to the following Lucene error:

Thanks

Benoit

Environment

None

Activity

Show:
Benoit Guillon
July 21, 2015, 9:54 AM

This problem was initially found on release 5.0.1, but seems to be still applicable on master.

Hardy Ferentschik
July 21, 2015, 11:47 AM

thanks for the detailed bug report. We will be looking into it asap.

Sanne Grinovero
July 21, 2015, 10:40 PM

I'll mark it for version 5.4.0.Final but w/o strong promise.. we might need to move it to the next sprint. I can't look at it this week, any volunteer? Looks like a simple one.
Thanks a lot, even a test!

Benoit Guillon
July 22, 2015, 10:07 AM

Hi,
I created pull request https://github.com/hibernate/hibernate-search/pull/874 to fix this issue.
Difficult to be sure this won't break another feature I'm not aware of, but all hibernate-search unit tests still pass after this change.

Sanne Grinovero
July 24, 2015, 8:10 AM

Merged

Assignee

Unassigned

Reporter

Benoit Guillon

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major
Configure