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

Boolean fields in embedded collections are not indexed properly when using Elasticsearch

    Details

      Description

      Boolean fields in embedded collections are not indexed properly when using Elasticsearch. When the Lucene document gets converted to JSON all the elements in the collection end up having the same value, that of the first element, regardless of the actual values.
      The PUT request to Elasticsearch can then contain wrong data and thus Elasticsearch ends up containing wrong data in the index.

      The problem seems to be in org.hibernate.search.elasticsearch.impl.ElasticsearchIndexWorkVisitor.convertFieldToJson(JsonObject, JsonAccessorBuilder, EntityIndexBinding, NestingMarker, Document, IndexableField):323, there we retrieve the value of the field from the Lucene document without taking into account the index of the item in the collection, thus always retrieving the first value.

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              m.diogo Miguel Diogo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: