|
|
|
|
|
|
If an entity is using a numeric typed identified an uses additional options on the id field such as:
{code}@Indexed @Entity public class SomeType { @Field(store = Store.YES) @Id private Long id; {code}
This will cause confusion in the metadata, as {{DocumentBuilderIndexedEntity#getIdBridge}} will return the correct bridge (which is a {{TwoWayString2FieldBridgeAdaptor}} wrapping a {{org.hibernate.search.bridge.builtin.LongBridge}} ) but {{DocumentFieldMetadata#getFieldBridge}} for fields named {{id}} will return a reference to {{org.hibernate.search.bridge.builtin.NumericFieldBridge.LONG_FIELD_BRIDGE}}
This inconsistency affects projection queries on the field; I'm also seeing something strange in the field load decoding from reading the Lucene Document, this seems to cause an off-by-one mismatch between {{FieldInfo}} metadata and the name pointing to the {{FieldInfo}}. I haven't found how this happens but its resolved if I avoid the above mapping, so I suspect that both fields are being written to the index too causing an ambiguity in the storage.
|
|
|
|
|
|