> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Breaking Changes - Discovery & Search | Official Documentation

> What changes in search and discovery when you upgrade from OpenMetadata 2.0 to 2.1, including the required reindex, stricter search access rules, new indexes, and ranking updates.

# Discovery & Search

Nothing in search stops working outright when you upgrade from 2.0 to 2.1, but you must reindex after
upgrading, and a few search endpoints are now stricter about who can call them.

## What Changed at a Glance

The table summarizes the search changes in 2.1.

| Change | Class | Who is affected |
| - | - | - |
| Reindex required after upgrade | Behavioral | Every deployment |
| Non-admin users can no longer search, sort, or filter on user emails | Behavioral | Integrations and UI screens that search users |
| Search preview, raw document lookup, and reindex failure list are restricted | Behavioral | Scripts calling these endpoints |
| Semantic (vector) search results are filtered by what the caller can view | Behavioral | Users of semantic search |
| Hybrid search weights swapped to favor keyword matching | Behavioral | Deployments using semantic search with default weights |
| Ranking can now boost by Tags and Certification | Additive | Search administrators |
| New indexes for metric groups, data contracts, and relationship types | Additive | Search administrators |
| New setting to turn column indexing on or off | Additive | Search administrators |

> [!NOTE]
>
> The Explore URL parameters, ordering model, and CSV export did not change between 2.0 and 2.1. If you
> are upgrading from 1.13, see [Breaking Changes: 1.13 to 2.0](https://docs.open-metadata.org/v2.0.x/deployment/upgrade/breaking-changes/overview.md).

## Reindex After You Upgrade

> [!NOTE]
>
> **Behavioral.** Affects every deployment. Run a full reindex as soon as the upgrade finishes.

OpenMetadata 2.1 adds new search indexes and changes the layout of existing ones, so documents written by 2.0 do not
have the new fields. Until you reindex, some results are incomplete. Counts and filters are also affected.

The upgrade does the following:

* It sets the **Search Indexing** application to reindex all entities.
* It clears the record of earlier successful indexing runs, so the Applications page shows that
  indexing must be run again.

To reindex, follow these steps:

1. Click the **Profile** icon and go to **Settings** > **Applications**.
2. Click **Search Indexing**.
3. Select the **Schedule** tab and click **Run now**. Leave **Entities** set to `All`, its default.

You can also trigger the reindex from your own automation.

Reindexing also does the following:

* It builds the new `relationshipType` index and the new glossary term attribute mapping.
* It fills in the access-control fields that search now relies on. Documents written before the upgrade
  are filtered only on the fields they already carry. For more information, see
  [Search Applies the Same Access Rules as Entity Reads](#search-applies-the-same-access-rules-as-entity-reads).
* It builds newly enabled indexes, such as metric groups and data contracts.

> [!NOTE]
>
> If you turn on **Enable Roles & Policies in Search** after upgrading, run another reindex. Tag-based
> rules on table columns only take effect once the column documents have been rebuilt.

## Search Applies the Same Access Rules as Entity Reads

> [!NOTE]
>
> **Behavioral.** Affects non-admin users, bots with restricted roles, and any client that searches users.

OpenMetadata already hides user email addresses from non-admin users when they open a user. Search now
follows the same rule. The following applies to callers who are not admins or bots:

* Search results from the user index never include `email`.
* A search that can reach user documents is rejected with a 400 error if it does any of the following:
  * It refers to an email field.
  * It searches every field.
  * It runs a script.
  * It carries a filter that is not plain JSON.
* Free-text searches over users keep working, but they no longer match on email addresses.
* Searching on a column called `email`, or on the tag `PII.Email`, is not affected.

The same applies to aggregations, sorting, and the export endpoints. A client that adds an email clause
to every user search will now get an error for non-admin callers. Send that clause only when the caller
is an admin or bot.

> [!NOTE]
>
> The Settings bot search adds an email clause. A non-admin who is allowed to view bots can see an error
> on that screen until the clause is sent for admins only.

Test case search results are also now masked for people who cannot view the underlying
table or column.

## Restricted Search Endpoints

> [!NOTE]
>
> **Behavioral.** Affects scripts and integrations that call these endpoints with a non-admin token.

| Endpoint | 2.0 | 2.1 |
| - | - | - |
| `POST /v1/search/preview` | Any authenticated user | Admins only |
| `GET /v1/search/get/{index}/doc/{id}` | Any authenticated user | Admins and bots only |
| `GET /v1/search/reindex/failures` | Any authenticated user | Admins only, and `limit` is capped at 1,000 |

The endpoints are restricted for the following reasons:

* The preview runs caller-supplied ranking settings that can slow the whole cluster.
* The document lookup returns raw documents without policy filtering.
* Failure records contain entity names and server error details.

Call these endpoints with an admin or bot token, or stop using them. Everyday search from the UI is
not affected.

## Semantic Search Results Respect Permissions

> [!NOTE]
>
> **Behavioral.** Affects users of semantic (vector) search.

Semantic search now drops any hit whose source entity the caller is not allowed to view. Admins see all
hits. Non-admins may see fewer results than in 2.0 for the same query. Semantic search also now covers
queries (saved SQL queries) as a searchable entity type. For more information, see
[Enable Semantic Search](https://docs.open-metadata.org/v2.1.x/deployment/semantic-search.md).

## Hybrid Search Weights Changed

> [!NOTE]
>
> **Behavioral.** Affects deployments with semantic search enabled.

The default split between keyword and semantic matching in hybrid search moves from 40% keyword and
60% semantic to 60% keyword and 40% semantic. The upgrade rewrites the stored weights only if they
are still exactly the old defaults. If you chose your own weights, they are left alone.

To keep the old behavior, set `keywordWeight` to `0.4` and `semanticWeight` to `0.6` in the search
settings after the upgrade.

## Ranking Can Boost by Tags and Certification

> [!NOTE]
>
> **Additive.** The ranking signals now allow `tags.tagFQN` and `certification.tagLabel.tagFQN`, in
> addition to entity type, Tier, status, usage, and votes.

The upgrade repairs saved term boosts that used an invalid certification field path, so boosts you
configured in **Settings** > **Search** for a certification now actually apply. This can change result
order for those assets. Update any automated test that checks the top result for a query.

The upgrade also fixes a mistyped field in the stored aggregation settings:

* Topic search facet **Field Names** previously always returned no values. It now works.
* API endpoint search now offers separate **Request Field Names** and **Response Field Names** facets
  in place of the single one.

## New Indexes and Settings

> [!NOTE]
>
> **Additive.** The reindex above fills all of these.

The upgrade adds the following:

* **New indexes**: metric groups, data contracts, and relationship types
* **Column indexing setting**: `enableColumnIndexing` in the search settings (default `true`). Turning it
  off stops indexing columns as standalone search documents and deletes the column search index.
  Turning it on creates the index again, and a reindex of tables fills it
* **Highlight flag**: a report in the search settings of whether highlighting can be turned on for each
  searchable field. The UI only shows the highlight toggle where it can work
* **Entity types endpoint**: `GET /v1/search/entityTypes`, which lists every entity type that has a search
  index and requires permission to view Applications
* **Connection pool defaults**: `ELASTICSEARCH_MAX_CONN_TOTAL` now defaults to 100 (was 30) and
  `ELASTICSEARCH_MAX_CONN_PER_ROUTE` to 50 (was 10). If your cluster limits connections, set both
  explicitly

## Search Settings Use New Aggregation Field Names

> [!NOTE]
>
> **Behavioral.** Affects admins with saved search settings and clients that read the aggregation settings.

In the search settings, the aggregation property `fieldsNames` is renamed to `fieldNames`. For API-endpoint
aggregations, `fieldNames` is split into `requestFieldNames` and `responseFieldNames`. The upgrade repairs
stored search settings. Update any script that reads or writes these properties, and run the reindex above so
the new fields are built.

## Search API Changes

Some search API changes affect request and response shapes. For more information, see
[API & Schema Contracts](https://docs.open-metadata.org/v2.1.x/deployment/upgrade/breaking-changes/api-and-schema.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.