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

# Search

Run a search against a ready index by choosing a schema type, building queries and filters, or loading a saved search.

The **Search** view runs a query against one ready index for a custom schema type, customers, or legal entities. You can build queries and filters on the page, or load a [saved search](https://developer.emporix.io/search-cockpit/saved-searches.md) and supply new query text.

## Choose a type and index

Open **Search** from the side menu. Choose a specific **Schema type**, such as a custom type, **Customers**, or **Legal entities**, and an associated **Index**.

Use an index with status **Ready**. An index that is still building is not ready for search, and the same applies to customer and legal-entity indexes while a reindex runs. For more information, see [Reindex customers or legal entities](https://developer.emporix.io/search-cockpit/indexes.md#reindex-customers-or-legal-entities).

## Build queries and filters

Use **Ask assistant** to build the search. Describe what you want to find, and the assistant adds the relevant queries and filters for the selected index. Review the result, edit it if needed, then run the search.

{% hint style="info" %}
The search query assistant is an AI agent that Support enables in the Agentic AI view when they set up the Search Cockpit.
{% endhint %}

<figure><img src="https://2149215519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERIsr5d67LF0wtgPlnHs%2Fuploads%2Fgit-blob-e157b08a48807a27f5dbdd4f0c6c4603f0a5a692%2Fsearch_cockpit_query_assistant.png?alt=media" alt="Search query assistant"><figcaption><p>Search query assistant</p></figcaption></figure>

You can also build the criteria yourself. Use a single query or filter when one condition is enough. Use a group when you need several clauses combined with **AND** or **OR**, including nested groups. You need at least one query or filter before you run a search. Changing a query or filter clears the current results.

### Queries

Under **Queries**, select **Add query** for one text match, or **Add group** to combine several queries. Each query defines a **Query field**, **Query type**, and **Query** text. Optionally, set **Boost** to a whole number from 1 to 10. Boost multiplies the score for matches on that clause, so you can rank hits that match an important field higher than hits that match a less important one.

You can choose between the following query types:

* **TEXT** – match analyzed tokens; supports fuzzy matching.
* **PHRASE** – match adjacent words in the same order.
* **AUTOCOMPLETE** – match according to the field autocomplete option.
* **WILDCARD** – match a case-sensitive pattern (`*` for any characters, `?` for one).

A **TEXT** or **PHRASE** query uses the analyzer of its field. When the field also has additional analyzers, choose one under **Analyzer** to match in a different way, for example by sound. Leave **Field default** to use the analyzer set in the field's **Analyzer** option.

To find exact spellings and similar-sounding names in one search, add two queries for the same field in an **OR** group. Set a higher **Boost** on the query that uses **Field default**, so exact spellings rank above names that only sound alike. For more information, see [Control text matching with analyzers](https://developer.emporix.io/search-cockpit/indexes.md#control-text-matching-with-analyzers).

### Filters

Under **Filters**, select **Add filter** for one condition, or **Add group** to combine several filters. Each filter defines a **Filter field**, **Operator**, and **Filter value**. Equality, range, list, and existence filters need an **Exact** field on the index. **CONTAINS** needs a **Text** field.

You can choose between the following operators:

* **EQ**, **NEQ** – equal or not equal to one value.
* **GT**, **GTE**, **LT**, **LTE** – greater than, greater than or equal, less than, or less than or equal to one value.
* **BETWEEN** – inclusive range; separate the two values with a comma.
* **IN**, **NOT\_IN** – match or exclude a list of values; separate values with a comma.
* **EXISTS** – field is present or absent; use `true` or `false`.
* **CONTAINS** – case- and diacritic-insensitive substring match.

### Conditions on a list of objects

Queries and filters on fields inside a list, such as the addresses of a customer, follow these rules:

* Conditions on the same list combined with **AND** must all match the same list item.
* Conditions combined with **OR** can match different items.
* A **NEQ** or **NOT\_IN** condition excludes a record when at least one list item has the excluded value. For example, **NEQ** `addresses.city` `Berlin` excludes a customer who has any address in Berlin.
* An **EXISTS** `false` condition excludes a record when at least one list item has the field.
* Records with an empty list are included.

For more information, see [Index a list of objects](https://developer.emporix.io/search-cockpit/indexes.md#index-a-list-of-objects).

## Run the search

Select **Search**. Matching records appear with ID, score, and document details. The score ranks how well each hit matches the query. Use **Previous** and **Next** when the result spans more than one page.

To keep the definition for later, select **Save search**. Provide an **Id**, **Name**, and **Description**. This creates the same kind of definition as **New saved search** on the Saved searches view. Saving a search does not rebuild the index.

## Use a saved search

Choose a **Saved search** on the Search page, then enter **Text** for the query terms stored in that definition. That single text value replaces the text of every stored query term when you run the search. Filters and other settings from the saved definition stay in place unless you change them on the page. You can still adjust filters and run **Search** as usual.

<figure><img src="https://2149215519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERIsr5d67LF0wtgPlnHs%2Fuploads%2Fgit-blob-bcc0143ba41e6aead01a43316cec4a6d5d7104f7%2Fsearch_cockpit_search.png?alt=media" alt="Search with a saved search"><figcaption><p>Searching with a saved search</p></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/search-cockpit/search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
