Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2230

Detect invalid cardinality of fields mapped as DocValues

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 6.0.0.Beta-backlog
    • Component/s: engine, spatial
    • Labels:
      None

      Description

      It appears that a mapping following this structure:

      root entity -> oneToMany -> Spatial fields

      will attempt to index the spatial coordinates multiple times for the same field name.
      Since Spatial now uses DocValues, this is an invalid mapping.

      The mapping has always been invalid as the pairs of coordinates would have been indexed in a mixed bag - so impossible to pair up a latitude with its related longitude - yet we didn't throw an exception at runtime when these were not DocValues.

      We should detect an illegal cardinality for DocValue fields at boot time, and fail fast.

      See also https://forum.hibernate.org/viewtopic.php?f=9&t=1043185

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sanne Sanne Grinovero
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: