> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Index a document (debug)

> The document format must be `application/vnd.lucidworks-document` or `application/vnd.solr-document`.



## OpenAPI

````yaml /api-reference/5.9/fusion-api-indexing.json post /index-pipelines/{id}/collections/{collection}/debug
openapi: 3.0.1
info:
  title: Fusion Indexing API
  description: |-
    The Lucidworks Fusion Indexing API manages
    parsers, index pipelines, index stages, index profiles, and subscriptions.
  contact:
    name: Lucidworks
    url: https://www.lucidworks.com
    email: support@lucidworks.com
  license:
    name: License of API
    url: https://lucidworks.com/legal/developer-license-agreement/
  version: '5.9'
servers:
  - url: https://{FUSION HOST}/api
    description: Fusion
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: 'Your environment host. '
  - url: https://{FUSION HOST}/api/apps/{APP_NAME}
    description: Fusion app
    variables:
      FUSION HOST:
        default: FUSION_HOST
        description: 'Your environment host. '
      APP_NAME:
        default: APP_NAME
        description: The name of your Fusion application.
security:
  - Basic auth: []
  - API key: []
tags:
  - name: Index Pipelines API
    description: >-
      Use these endpoints to view and manage your index pipelines.  You can also
      index documents using this API, though the Index Profiles API is
      recommended instead.
  - name: Index Profiles API
    description: >-
      The Index Profiles API provides static endpoints that you can consistently
      point to when indexing your documents.  Index profiles allow you to change
      the index pipelines, parsers, or collections behind them without changing
      the endpoint you use for indexing.  See the Index Profiles CRUD API for
      endpoints that create and modify index profiles.
  - name: Index Profiles CRUD API
    description: >-
      Use these endpoints to create and modify index profiles.  Index profiles
      allow you to change the index pipelines, parsers, or collections behind
      them without changing the endpoint you use for indexing.  See the Index
      Profiles API for the indexing endpoints.
  - name: Index Stage API
    description: >-
      Use these endpoints to view the available index pipeline stages and their
      configuration parameters.
  - name: Index Stage Plugins API
    description: >-
      Use these endpoints to view, install, and manage custom index stages
      developed with the Index Stage SDK.
  - name: Parsers CRUD API
    description: >-
      Endpoints to perform Create-Read-Update-Delete operations on Parsers,
      Deprecated: use async-parsing endpoint instead.
  - name: Parsers Schema API
    description: >-
      Endpoints to get the Schema of Parsers. Deprecated: use async-parsing
      endpoint instead.
  - name: Subscriptions API
    description: The Subscriptions API
externalDocs:
  description: Lucidworks Documentation
  url: https://doc.lucidworks.com/
paths:
  /index-pipelines/{id}/collections/{collection}/debug:
    post:
      tags:
        - Index Pipelines API
      summary: Index a document (debug)
      description: >-
        The document format must be `application/vnd.lucidworks-document` or
        `application/vnd.solr-document`.
      operationId: debugPipelineDocument
      parameters:
        - name: id
          description: The index pipeline ID
          in: path
          required: true
          schema:
            type: string
          example: default
        - name: collection
          description: The collection ID
          in: path
          required: true
          schema:
            type: string
        - name: simulate
          description: >-
            Run the pipeline in "simulate" mode for these docs. Stages with
            "side-effects" are skipped.
          in: query
          schema:
            type: boolean
            default: false
        - name: echo
          description: If `true`, indexed documents are included in the response.
          in: query
          schema:
            type: boolean
            default: true
        - name: echoMaxCount
          description: >-
            The number of documents to include in the response, with `-1`
            implying "all".
          in: query
          schema:
            type: integer
            format: int32
            default: -1
        - name: bufferDocsForSolr
          description: If `true`, the SolrIndexStage buffers docs.
          in: query
          schema:
            type: boolean
        - name: throwOnError
          description: >-
            Indicates if the indexing should proceed if an error is encountered
            or if it should throw an exception.
          in: query
          schema:
            type: boolean
            default: true
        - name: params
          description: Indexing request parameters.
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/MultiValueMapStringString'
      requestBody:
        content:
          application/vnd.lucidworks-document:
            schema:
              type: object
          application/vnd.solr-document:
            schema:
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexPipelineDebugResponse'
components:
  schemas:
    MultiValueMapStringString:
      description: The parameters of the indexing request.
      type: object
      properties:
        all:
          type: object
          additionalProperties:
            type: string
          writeOnly: true
        empty:
          type: boolean
      additionalProperties:
        type: array
        items:
          type: string
    IndexPipelineDebugResponse:
      description: The indexed documents, plus additional details for debugging.
      type: object
      properties:
        stages:
          description: The stages executed by the index pipeline.
          type: array
          items:
            $ref: '#/components/schemas/StageConfig'
        output:
          description: The executed pipeline stages and their document output.
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ContextAndDoc'
        outputEncounteredCount:
          description: The number of documents indexed.
          type: integer
          format: int64
    StageConfig:
      description: A JSON object defining the configuration of an index stage.
      type: object
      properties:
        type:
          description: The index stage type.
          type: string
        id:
          description: The unique ID for this index stage.
          type: string
        label:
          description: A unique human-readable label for this index stage.
          type: string
        condition:
          description: >-
            A conditional script that must result in `true` or `false`. You can
            use this to run or skip this stage depending on whether conditions
            are met.
          type: string
        skip:
          description: >-
            `True` to disable this index stage without removing it from the
            index pipeline.
          type: boolean
      discriminator:
        propertyName: type
    ContextAndDoc:
      description: The indexed documents, plus context information for debugging.
      type: object
      properties:
        context:
          description: The indexing request parameters.
          type: object
          additionalProperties:
            type: object
        error:
          description: Indexing error, if any.
          type: string
        doc:
          $ref: '#/components/schemas/PipelineDocument'
    PipelineDocument:
      description: >-
        An indexed document, as a JSON object.  You can use this to validate the
        index pipeline's output.
      type: object
      properties:
        id:
          description: The unique document ID.
          type: string
        fields:
          description: The field present in the indexed document.
          type: array
          items:
            $ref: '#/components/schemas/PipelineField'
        metadata:
          description: Metadata about the index document.
          type: object
          additionalProperties:
            type: string
        commands:
          description: Solr commands.
          type: array
          items:
            $ref: '#/components/schemas/Command'
        hints:
          description: Additional details about a field and its values.
          type: object
          additionalProperties:
            uniqueItems: true
            type: array
            items:
              type: string
    PipelineField:
      description: A field in an indexed document.
      type: object
      properties:
        name:
          type: string
        value:
          type: object
        metadata:
          description: Pipeline field metadata.
          type: object
          additionalProperties:
            type: string
        annotations:
          description: Pipeline field annotations.
          type: array
          items:
            $ref: '#/components/schemas/Annotation'
    Command:
      description: A Solr command.
      type: object
      properties:
        name:
          type: string
        params:
          type: object
          additionalProperties:
            type: string
    Annotation:
      description: Pipeline field annotation.
      type: object
      properties:
        type:
          type: string
        start:
          type: integer
          format: int64
        end:
          type: integer
          format: int64
        features:
          type: object
          additionalProperties:
            type: string
            deprecated: true
          deprecated: true
        label:
          type: string
        featureCount:
          type: integer
          format: int32
          deprecated: true
  securitySchemes:
    Basic auth:
      type: http
      scheme: basic
    API key:
      name: x-api-key
      type: apiKey
      in: header

````