--- title: Index metadata slug: o3ca0547 canonical_url: https://docs.coveo.com/en/o3ca0547/ collection: index-content source_format: adoc --- # Index metadata -- Once you've [created a source](https://docs.coveo.com/en/3390#add-a-source) and it's done [indexing](https://docs.coveo.com/en/204/) your content for the first time, you should focus your attention on the [metadata](https://docs.coveo.com/en/218/) you want to index. This will later allow you to configure critical aspects of your Coveo-powered [search interface](https://docs.coveo.com/en/2741/), such as [facets](https://docs.coveo.com/en/198/). ![Facets on a sports equipment retailer website | Coveo](https://docs.coveo.com/en/assets/images/index-content/index-metadata-facets.png) For example, on a sports equipment retailer website, facets could let customers search by color and brand. Selecting a color would narrow the products down to only those matching this criteria. It's therefore crucial to index your metadata, as this impacts your end user's experience. -- ## From metadata to facets Facets are based on the content indexed in the [fields](https://docs.coveo.com/en/200/) of your [items](https://docs.coveo.com/en/210/). This means that, before you create a facet for a specific piece of metadata, you must ensure that this metadata is indexed in a field. In general, there are three steps to using content repository data as facet values in a Coveo-powered search interface: 1 [Extract the metadata](#step-1-extract-metadata) you want to use as a facet from your content repository. 2 [Create a source mapping and a field](#step-2-create-a-source-mapping-and-a-field) to store the extracted metadata. 3 [Reference the field in a facet](#step-3-reference-the-field-in-a-facet). ![From metadata to facet | Coveo](https://docs.coveo.com/en/assets/images/index-content/from-metadata-to-facet.gif) ## Step 1: Extract metadata -- Extracting metadata begins with determining what piece of information in your content repository you want to use as filtering criteria. You should be able to look at your content repository items and identify the metadata values you want to index. Typically, each repository item (or each item in a subset of your repository items) will expose a value (or a set of values) for a given metadata. ![Extract metadata | Coveo](https://docs.coveo.com/en/assets/images/index-content/metadata-mapping-field-facet-extract-metadata.png) For example, if a portion of your company's website is dedicated to software documentation, you might want to index the `audience` metadata of those pages, where each page would contain values such as `User`, `System Administrator`, or both. You might need to configure your source to extract custom metadata from your content repository. However, since Coveo sources automatically extract basic metadata as well as metadata that's inherent to the source type, you should check if the metadata you want to use is already extracted before configuring your source to extract custom metadata. ![View and map metadata subpage | Coveo](https://docs.coveo.com/en/assets/images/index-content/view-metadata-with-mapped-and-unmapped-meta.png) To determine which metadata is automatically extracted, access the **View and map metadata** subpage. On the [**Sources**](https://platform.cloud.coveo.com/admin/#/orgid/content/sources/) ([platform-ca](https://platform-ca.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-eu](https://platform-eu.cloud.coveo.com/admin/#/orgid/content/sources/) | [platform-au](https://platform-au.cloud.coveo.com/admin/#/orgid/content/sources/)) page, click your source, and then click **More** > **View and map metadata**. Review the **Metadata Name** and **Example Value** columns to identify whether the metadata you want to use is already extracted. You can expand a metadata row to show additional extracted values. If the desired metadata is already extracted, you can move on to [step 2](#step-2-create-a-source-mapping-and-a-field). If the desired metadata isn't already extracted, configure your source to extract custom metadata. -- ### Extract custom metadata The way to extract custom metadata varies from one source type to the next. The following table lists methods you can use with common source types: [%header,cols="1,5"] |=== ^|Source type |Custom metadata extraction methods ^|[Push API](https://docs.coveo.com/en/1546/) |Define metadata key-value pairs in the `addOrUpdate` section of the PUT request payload used to [upload push operations to an Amazon S3 file container](https://docs.coveo.com/en/90#step-2-upload-the-content-update-into-the-file-container). ^a|[REST API](https://docs.coveo.com/en/1896/) and [GraphQL API](https://docs.coveo.com/en/n6gh2329/) |In the JSON configuration ([REST API](https://docs.coveo.com/en/1525/) \| [GraphQL API](https://docs.coveo.com/en/o1ae7549/)) of the source, define metadata names ([REST API](https://docs.coveo.com/en/1525#metadata-object) \| [GraphQL API](https://docs.coveo.com/en/o1ae7549#metadata-object)) and specify where to locate the metadata values in the JSON API response Coveo receives. ^|[Database](https://docs.coveo.com/en/1885/) |Add [`` elements](https://docs.coveo.com/en/l15b4451#customfields) in the XML configuration. Each element defines a metadata name and the database field to use to populate the metadata with. ^|[Web](https://docs.coveo.com/en/malf0160/) a|* Configure [web scraping](https://docs.coveo.com/en/2767/) configurations that contain [metadata extraction rules](https://docs.coveo.com/en/mc1f3573#metadata-to-extract) using CSS or XPath selectors. * Extract metadata from [JSON-LD `