Product Selector

Fusion 5.12
    Fusion 5.12

    Index Pipelines APIFusion Indexing APIs

    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

    The full set of fields for each stage type are not included in the following examples. See Index Pipeline Stages Reference for more information about the fields available for each stage.

    List the 'default' pipeline:

    REQUEST

    curl -u USERNAME:PASSWORD https://FUSION_HOST:FUSION_PORT/api/index-pipelines/default

    RESPONSE

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

    Create the pipeline in the "MyApp" app

    REQUEST

    curl -u USERNAME:PASSWORD -X POST -H 'Content-type: application/json' -d '{
        "id": "my-index-pipeline",
        "stages": [
            {
                "id": "field_mapping",
                "type": "field-mapping",
                "reservedFieldsMappingAllowed": false
            },
            {
                "id": "solr_dynamic_field_mapping",
                "type": "solr-dynamic-field-name-mapping",
                "advancedTextFieldsIndexing": true
            },
            {
                "id": "solr_indexing",
                "type": "solr-index",
                "fieldsList": false
            }
        ]
    }' https://FUSION_HOST:FUSION_PORT/api/apps/MyApp/index-pipelines

    RESPONSE

    {
        "id": "my-index-pipeline",
        "stages": [
            {
                "id": "field_mapping",
                "translationMappings": [],
                "retentionMappings": [],
                "updateMappings": [],
                "unmappedRule": {
                    "keep": true,
                    "delete": false,
                    "fieldToMoveValuesTo": "",
                    "fieldToCopyValuesTo": "",
                    "valueToAddToUnmappedFields": "",
                    "valueToSetOnUnmappedFields": ""
                },
                "reservedFieldsMappingAllowed": false,
                "type": "field-mapping",
                "skip": false,
                "secretSourceStageId": "field_mapping"
            },
            {
                "id": "solr_dynamic_field_mapping",
                "duplicateSingleValuedFields": false,
                "fieldsToExclude": [],
                "advancedTextFieldsIndexing": true,
                "maxTextLengthForAdvancedIndexing": 100,
                "type": "solr-dynamic-field-name-mapping",
                "skip": false,
                "secretSourceStageId": "solr_dynamic_field_mapping"
            },
            {
                "id": "solr_indexing",
                "enforceSchema": true,
                "fieldsList": false,
                "dateFormats": [],
                "params": [],
                "bufferDocsForSolr": true,
                "allowBlacklistedRequestParameters": false,
                "type": "solr-index",
                "skip": false,
                "secretSourceStageId": "solr_indexing"
            }
        ],
        "properties": {
            "secretSourcePipelineId": "my-index-pipeline"
        }
    }