As an operator, I would like Bitbucket server to configure the dynamic mapper property in the elasticsearch index

XMLWordPrintable

      When installing the new version of Bitbucket server 4.10 it requires an Elasticsearch cluster to enable the code search functionality.

      We pointed our Bitbucket server to a shared Elasticsearch 2.3.2 cluster. There is a slight issue with changing one of the settings your docs required us to change globally in a shared Elasticsearch environment. It is the dynamic mapper setting index.mapper.dynamic to be set to false.

      Doc: https://confluence.atlassian.com/bitbucketserver/install-and-configure-a-remote-elasticsearch-instance-815577748.html

      Your docs ask to turn it off globally in elasticsearch.yml. We can't do this on our shared Elasticsearch cluster because other indexes require it to be on by default and on is the default setting.

      It is possible to configure this setting at the index level instead of globally, other apps like marvel do this for us to. So as a workaround we changed the index.mapper.dynamic setting via the Elasticsearch API on the bitbucket-search-v1 index.

      I really feel Bitbucket server could do this for us when creating the index. This has the benefit of not making changes at a global scope making it more friendly for shared Elasticsearch environments.

      Another benefit is it would makes it easier for us to automate the deployment of Bitbucket server into a shared Elasticsearch environment.

      Below is the API call I had to make in order configure the index. If Bitbucket server just passed this setting during index creating we wouldn't need to do this.

      curl -u es_admin -XPUT 'https://elk.acme.com:9200/bitbucket-search-v1/_settings' -d '{
          "settings" : {
            "index" : {
                "mapper" : {
                  "dynamic" : "false"
                }
              }
          }
      }'
      

      Thank you very much for your time. Have a great weekend.

            Assignee:
            Unassigned
            Reporter:
            Ryan Currah
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: