Fusion Server

Version 4.2
How To
Documentation
    Learn More

      Index Pipelines API

      Table of Contents

      The Index Pipelines API provides methods for managing a set of named index pipelines. Every pipeline is made up of one or more stages. Stages can be defined during the creation of a pipeline, or stages can be defined separately and included into one or more pipelines. For details of the REST API for index stages, see Index Stages API.

      Document processing proceeds stage by stage in a linear fashion. The order of the stages in a pipeline is the order in which they were defined. At installation, Fusion includes several pre-configured pipelines. See Index Pipelines for details on these default pipelines.

      For more information about structuring documents for indexing, see Importing Data with the REST API.

      Examples

      List the 'default' pipeline: REQUEST

      curl -u user:pass http://fusion-host:8764/api/index-pipelines/default

      RESPONSE

      {
        "id" : "default",
        "stages" : [ {
          "type" : "solr-index",
          "id" : "solr-default",
          "skip" : false
        } ]
      }

      Create an index pipeline named 'my-index-pipeline' with three stages, one of which does not yet exist:

      In order to see this object within the Fusion UI, it must be associated with an app. To do this, create the object using the /apps endpoint.

      REQUEST

      curl -u user:pass -X POST -H 'Content-type: application/json' -d '{"id":"my-index-pipeline","stages":[{"id":"tika","type":"tika-parser","includeImages":true},{"id":"conn_mapping","type":"ref"},{"id":"solr-default","type":"ref"}]}' http://fusion-host:8764/api/index-pipelines

      RESPONSE

      {
        "id" : "my-index-pipeline",
        "stages" : [ {
          "type" : "tika-parser",
          "id" : "tika",
          "includeImages" : true,
          "flattenCompound" : false,
          "addFailedDocs" : false,
          "addOriginalContent" : true,
          "contentField" : "_raw_content_",
          "skip" : false,
          "label" : "tika-parser"
        }, {
          "type" : "ref",
          "id" : "conn_mapping",
          "skip" : false,
          "label" : "ref"
        }, {
          "type" : "ref",
          "id" : "solr-default",
          "skip" : false,
          "label" : "ref"
        } ]
      }

      Reload the 'my-index-pipeline' pipeline:

      INPUT

      curl -u user:pass -X PUT http://fusion-host:8764/api/index-pipelines/my-index-pipeline/refresh
      Loading API specification...