Raw
1 ---
2 sidebar_label: "Manage Search Indexes"
3 tags:
4 - user guide
5 - search
6 products:
7 - search
8 - settings
9 ---
10
11 import { Table } from "docs-ui"
12
13 export const metadata = {
14 title: `Manage Search Indexes in Medusa Admin`,
15 }
16
17 # {metadata.title}
18
19 In this guide, you’ll learn how to view your store’s search indexes and rebuild them in the Medusa Admin.
20
21 <Note>
22
23 Search indexes are available from [Medusa v2.21.1](https://github.com/medusajs/medusa/releases/tag/v2.21.1). If you don’t see the Search settings in your Medusa Admin, request your technical team to [upgrade your Medusa application](!docs!/learn/update) or set up search for your store.
24
25 </Note>
26
27 ## Overview
28
29 A search index is a copy of some of your store’s data, such as your products, that your storefront searches instead of querying your database directly. This makes search results faster and ranks them by how well they match what the customer typed.
30
31 Your technical team decides which data each index holds. In the Medusa Admin, you can see the indexes they set up and rebuild any of them.
32
33 ---
34
35 ## View Search Indexes
36
37 To view your store’s search indexes, go to Settings → Search.
38
39 Each index shows in its own card with the following details:
40
41 - The index’s name, such as product.
42 - **Provider**: the search service that stores this index, such as [Medusa Search](!cloud!/search) or PostgreSQL.
43 - [The index’s status](#index-statuses), shown as a badge.
44 - **Indexed fields**: the data that the index holds, such as `title` or `description`. Hover over a field to see its type and what customers can do with it, such as search, filter, or sort by it.
45 - The **Reindex** button, which rebuilds the index. Refer to [Reindex a Search Index](#reindex-a-search-index).
46
47 Most Medusa stores have a product index that your technical team set up. They can also set up [other search indexes](!resources!/infrastructure-modules/search/index-definitions) for other entities, such as brands or orders.
48
49 ### Index Statuses
50
51 <Table>
52
53 <Table.Header>
54 <Table.Row>
55 <Table.HeaderCell>
56 Status
57 </Table.HeaderCell>
58 <Table.HeaderCell>
59 Description
60 </Table.HeaderCell>
61 </Table.Row>
62 </Table.Header>
63 <Table.Body>
64 <Table.Row>
65 <Table.Cell>
66 Pending
67 </Table.Cell>
68 <Table.Cell>
69 The index is set up, but Medusa hasn’t built it yet.
70 </Table.Cell>
71 </Table.Row>
72 <Table.Row>
73 <Table.Cell>
74 Building
75 </Table.Cell>
76 <Table.Cell>
77 Medusa is currently building the index. Search results for this index may be incomplete until the build finishes.
78 </Table.Cell>
79 </Table.Row>
80 <Table.Row>
81 <Table.Cell>
82 Ready
83 </Table.Cell>
84 <Table.Cell>
85 The index is up to date, and customers can search it.
86 </Table.Cell>
87 </Table.Row>
88 <Table.Row>
89 <Table.Cell>
90 Error
91 </Table.Cell>
92 <Table.Cell>
93 Medusa couldn’t build the index. Rebuild the index, and if the error persists, contact your technical team.
94 </Table.Cell>
95 </Table.Row>
96 </Table.Body>
97
98 </Table>
99
100 ---
101
102 ## Reindex a Search Index
103
104 Medusa keeps an index up to date as your data changes, so you rarely need to rebuild one. Rebuild an index, which is also called reindexing, in the following cases:
105
106 - Search results show data that you already changed or deleted.
107 - Search results miss items that you expect to find.
108 - The index’s status is "Error".
109
110 To rebuild an index:
111
112 1. Go to Settings → Search.
113 2. Find the index you want to rebuild.
114 3. Click the **Reindex** button in the index’s card. The button is disabled while the index’s status is "Building".
115 4. In the window that opens, set the following optional fields:
116 - **Since**: choose a date and time to rebuild only the data that changed at or after that point. Leave this field empty to rebuild the whole index.
117 - **Entity IDs**: enter the IDs of the items you want to rebuild, separated by commas or new lines. Leave this field empty to rebuild the whole index.
118 5. Click the **Reindex** button.
119
120 Medusa then rebuilds the index from your store’s data. Search results for that index may be incomplete while the status is "Building", and a large index can take a while to finish.