[hibernate-commits] [hibernate/hibernate-search] 22f15f: HSEARCH-3407 Remove an unnecessary null check

GitHub noreply at github.com
Wed Nov 7 06:04:41 EST 2018


  Branch: refs/heads/5.6
  Home:   https://github.com/hibernate/hibernate-search
  Commit: 22f15f73f8c149403f5f3e823f06d60e04a50f2b
      https://github.com/hibernate/hibernate-search/commit/22f15f73f8c149403f5f3e823f06d60e04a50f2b
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2018-11-07 (Wed, 07 Nov 2018)

  Changed paths:
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchIndexWorkVisitor.java

  Log Message:
  -----------
  HSEARCH-3407 Remove an unnecessary null check


  Commit: 0d17b308cdcd83ab9d380196a3a705ee06369a3b
      https://github.com/hibernate/hibernate-search/commit/0d17b308cdcd83ab9d380196a3a705ee06369a3b
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2018-11-07 (Wed, 07 Nov 2018)

  Changed paths:
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchIndexWorkVisitor.java
    M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/logging/impl/Log.java

  Log Message:
  -----------
  HSEARCH-3407 Correctly fetch the value of multi-valued boolean fields in the Elasticsearch integration

We used to rely on TwoWayFieldBridge, but this only works when there is
a single value for the field, because we just tell the bridge "fetch the
value for the field with this name", and the bridge doesn't know which
value to fetch, so it'll just return the first one.

We solve this by fetching the raw (string) value ourselves, and passing
the value to the bridge directly.

This means custom bridges not implementing TwoWayStringBridge will not
work. But I don't see the point of custom bridges in this case anyway,
since we only detect the boolean type when the property itself is of
type boolean or Boolean, so users may as well rely on the default
bridge.


  Commit: 4b93578c811f8f28f60173c701911c7327d2203a
      https://github.com/hibernate/hibernate-search/commit/4b93578c811f8f28f60173c701911c7327d2203a
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2018-11-07 (Wed, 07 Nov 2018)

  Changed paths:
    A engine/src/test/java/org/hibernate/search/test/bridge/MultiValuedBooleanBridgeTest.java

  Log Message:
  -----------
  HSEARCH-3407 Test indexing of multi-valued boolean fields


Compare: https://github.com/hibernate/hibernate-search/compare/e49037d9045b...4b93578c811f
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the hibernate-commits mailing list