Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19194

Upgrade from Elasticsearch 1.5.2 to 2.x

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.1
    • Fix Version/s: 8.10
    • Component/s: Elasticsearch
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      From version 8.10, Nuxeo uses ElasticSearch 2.x version. You'll need to upgrade your cluster by following these steps: https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html

      You may also have a look at breaking changes: https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking-changes-2.0.html

      BREAKING CHANGES:

      • '.' are no longer accepted in a property name. Additional properties on ecm:path have changed, we replaced '.' by '@'.
        For example:
      • ecm:path.depth -> ecm:path@depth
      • ecm:path.level1 -> ecm:path@level1
      • ecm:path.level2 -> ecm:path@level2
        ...
        If you have fields with dot, you need to drop your index, upgrade cluster + nuxeo and re-index your repository.
      • NxQueryBuilder#limit won't accept -1 soon due to ElasticSearch change on index.max_result_window. This parameter is now 10000 by default, which prevent us to set Integer.MAX_VALUE in order to return all documents.
        In order to fetch all documents, we recommend you to use the scroll API instead (ElasticSearchComponent#scroll).
        All queries made with a -1 limit will fail unless you update the index.max_result_window setting on ES cluster (highly unrecommended).
      Show
      From version 8.10, Nuxeo uses ElasticSearch 2.x version. You'll need to upgrade your cluster by following these steps: https://www.elastic.co/guide/en/elasticsearch/reference/current/restart-upgrade.html You may also have a look at breaking changes: https://www.elastic.co/guide/en/elasticsearch/reference/2.0/breaking-changes-2.0.html BREAKING CHANGES: '.' are no longer accepted in a property name. Additional properties on ecm:path have changed, we replaced '.' by '@'. For example: ecm:path.depth -> ecm:path@depth ecm:path.level1 -> ecm:path@level1 ecm:path.level2 -> ecm:path@level2 ... If you have fields with dot, you need to drop your index, upgrade cluster + nuxeo and re-index your repository. NxQueryBuilder#limit won't accept -1 soon due to ElasticSearch change on index.max_result_window. This parameter is now 10000 by default, which prevent us to set Integer.MAX_VALUE in order to return all documents. In order to fetch all documents, we recommend you to use the scroll API instead (ElasticSearchComponent#scroll). All queries made with a -1 limit will fail unless you update the index.max_result_window setting on ES cluster (highly unrecommended).
    • Sprint:
      nxfit 8.4.2, nxfit 8.4.3, nxfit 8.4.5, nxfit 8.4.4
    • Story Points:
      8

      Description

      Upgrade Elasticsearch to the lastest 2.x available.

      Note that we don't use the pristine elasticsearch-2.3.5.jar because it contains unshaded optimized Joda class BaseDateTime.
      This is reported by the tattletalle maven plugin as a multiplejars conflict. The optimized ES implementation of BaseDateTime is only useful on the server side and not on the Transport Client side, it comes with a visibility drawback that Joda maintainers don't want to merge. Therefore we are using a patched version named elasticsearch-2.3.5-nx1.jar that just removes org/joda/time/base/BaseDateTime.class.
      The jar can be build like this:

      zip -d elasticsearch-2.3.5.jar 'org/joda/time/base/*'
      zip elasticsearch-2.3.5.jar PATCH.txt
      mv elasticsearch-2.3.5.jar elasticsearch-2.3.5-nx1.jar
      

      Also it requires to deploy the pom file elasticsearch-2.3.5-nx1.pom which is the Elasticsearch pom artifact with a the new version (see patch attached).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.