> For the complete documentation index, see [llms.txt](https://docs.search.io/developer-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.search.io/developer-documentation/fundamentals/pipelines/steps.md).

# Steps

Steps are a unit of work in the pipeline flow that is responsible to perform the individual tasks listed above.

Steps are made up of several components:

* **Constants**  -  are used to configure steps. They are fixed and can't be changed at query time.
* **Parameters** - Params are key-value pairs that are initialized with the request and are passed from step to step. Each step has the ability to add or modify params, passing them on to subsequent steps. Once the pipeline has been executed, the modified params become available as output values of the pipeline.
* **Conditions** - Each step can be conditionally executed based on the input values. Conditions are boolean expressions that can be defined using operators (AND/OR and =,\~,>,<,!=, etc) to evaluate the pipeline param values. If the condition is satisfied, then the step will execute, otherwise, it is bypassed.

Tip: If you want a step to execute when a variable does not exist then wrap your condition in quotes i.e. `condition:"!myVariable"` which will force the special character `!` to be interpreted as a string

### Pre-steps and Post-steps <a href="#pre-steps-and-post-steps" id="pre-steps-and-post-steps"></a>

Pre- and Post- steps split the pipeline into two parts. One that runs before the request is sent to the search index and another that runs afterward.

#### **Pre and Post-steps in query pipelines**

When running a query, the pipeline post-steps have access to the result-set. This makes it possible to act on the result before sending them back to the caller.

#### **Pre and Post-steps in record pipelines**

For indexing operations, pre-steps are used to update and augment the record before it is stored in the index. The pipeline post-steps only run when creating new records. They do not execute when updating records.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.search.io/developer-documentation/fundamentals/pipelines/steps.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
