Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-6854

Reindex unable to find custom mapping defined in Studio

    XMLWordPrintable

    Details

      Description

      Steps to Reproduce:

      1. In Studio Modeler, navigate to Search -> Elasticsearch Mapping
      2. Add a mapping for any field
      3. Deploy Studio project to instance
      4. Attempt a full repository reindex

      Expected Results: Able to perform the reindex
      Actual Results: The following error is seen

      Caused by: java.lang.IllegalArgumentException: Resource file cannot be found: /Users/nicolepeacock/nuxeo_server_instances/nuxeo-server-tomcat-2021.1_orig/nxserver/config/npeacock-SANDBOX-0-elasticsearch-mapping.json or npeacock-SANDBOX-0-elasticsearch-mapping.json
          at org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig.getResourceStream(ElasticSearchIndexConfig.java:173) ~[nuxeo-elasticsearch-core-2021.26.5.jar:?]
          at org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig.contentOfFile(ElasticSearchIndexConfig.java:146) ~[nuxeo-elasticsearch-core-2021.26.5.jar:?]
      

      It seems that the path of the json file in the extension needs to have OSGI-INF/<file_name>, e.g.

      <extension target="org.nuxeo.elasticsearch.ElasticSearchComponent" point="elasticSearchIndex">
          <elasticSearchIndex name="${elasticsearch.indexName:=nuxeo}">
            <mapping file="OSGI-INF/npeacock-SANDBOX-0-elasticsearch-mapping.json" append="true"/>
          </elasticSearchIndex>
      </extension>
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: