Platform Explorer / Nuxeo Platform 11.3

Component org.nuxeo.elasticsearch.ElasticSearchComponent


Resolution Order

The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

721 (Declared Start Order: 50)
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.


Class: org.nuxeo.elasticsearch.ElasticSearchComponent


Extension Points

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.elasticsearch.ElasticSearchComponent" version="1.0">
  <implementation class="org.nuxeo.elasticsearch.ElasticSearchComponent" />

    <provide interface="org.nuxeo.elasticsearch.api.ElasticSearchService" />
    <provide interface="org.nuxeo.elasticsearch.api.ElasticSearchIndexing" />
    <provide interface="org.nuxeo.elasticsearch.api.ElasticSearchAdmin" />

  <extension-point name="elasticSearchEmbeddedServer">
      Extension point to setup an embedded Elasticsearch instance.

      It creates a local node using the same JVM as Nuxeo.

      This is a test configuration and must NOT be used in production,
      it is limited to one shard and no replica.

        <elasticSearchLocal clusterName="MyCluster" httpEnabled="true" indexStoreType="mmapfs" nodeName="MyNuxeo"
                            pathData="/var/lib/nuxeo/elasticsearch/" />

      Please refer to the Elasticsearch node configuration

      clusterName is the

      nodeName is the, default to nuxeoNode

      pathData is the

      indexStoreType is the index.store_type

      httpEnabled is the node.enable_http


    <object class="org.nuxeo.elasticsearch.config.ElasticSearchEmbeddedServerConfig" />

  <extension-point name="elasticSearchClient">
      Extension point to define how to access the Elasticsearch cluster.

      For the TransportClient protocol:
        <elasticSeachClient class="org.nuxeo.elasticsearch.client.ESTransportClientFactory">
          <option name="addressList">localhost:9300</option>
          <option name="clusterName">elasticsearch</option>
          <option name="clientTransportSniff">false</option>
          <option name="clientTransportIgnoreClusterName">false</option>
          <option name="clientTransportPingTimeout">5s</option>
          <option name="clientTransportNodesSamplerInterval">5s</option>

      For a Rest client:
        <elasticSeachClient class="org.nuxeo.elasticsearch.client.ESRestClientFactory">
          <option name="addressList">localhost:9200</option>

    <object class="org.nuxeo.elasticsearch.config.ElasticSearchClientConfig" />

  <extension-point name="elasticSearchIndex">
      Extension point used to setup an Elasticsearch index.

      The one used to index Nuxeo documents must be of type "doc".

        <elasticSearchIndex name="nuxeo" create="true" type="doc">

      @Since 5.9.3
      name is the Elasticsearch index name.

      type is the Elasticsearch type that hold a mapping, "doc" is the mapping
      for Nuxeo documents

      create can be set to false if you don't want Nuxeo to initialize the index
      and mapping.

      settings the Elasticsearch settings

      mapping the Elasticsearch mapping for the type

      @Since 5.9.5
      fetchFromSources, include a list of field name pattern that will be included
      when fetching document from Elasticsearch (@see NxQueryBuilder.fetchFromElasticsearch)
      use the exclude list to prevent returning fulltext or long fields.


    <object class="org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig" />

  <extension-point name="elasticSearchDocWriter">
      Extension point used to setup the writer used when a document is indexed.
      Must extend the JsonESDocumentWriter class.

        <writer class="" />

    <object class="org.nuxeo.elasticsearch.config.ElasticSearchDocWriterDescriptor" />

  <extension-point name="elasticSearchHints">
      Extension point used to define the NXQL hints which enables the use of Elasticsearch operators.
      Must implement the ESHintQueryBuilder interface.

      @see to have the available ES hints.

    <object class="org.nuxeo.elasticsearch.config.ESHintQueryBuilderDescriptor" />