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

# Search products by metafield

If your products have custom metafields (material, technical specs, certifications, and so on), you can include them as a searchable field so shoppers can...

## What this does

Search normally only looks at built-in fields like title, tags, and description — it has no knowledge of custom metafield values unless you add the metafield as a searchable field. For example, if a product has a **Material** metafield set to "Merino wool", a shopper searching "merino" gets no match by default, since that word appears nowhere in the title, description, or tags. Adding **Metafield** as a search field (and declaring which metafield to use) makes that value searchable too, so the same search for "merino" now finds the product.

## Prerequisites

* The metafield must already exist and have values set on your products in Shopify.

## Step 1: Enable the metafield for search

1. In the app, go to **Settings > Metafields**.
2. Click **Add metafield**.
3. Choose **Resource** (Product or Variant), then enter the metafield's **Namespace** and **Key** exactly as defined in Shopify.
4. Under **Applies to**, make sure **Search** is checked — this is what makes the metafield's value searchable. Declaring a metafield without turning this on only makes it available for the fields you did check (e.g. filter, sort), not search.
5. Click **Sync metafields**, then click **Save** in the bar at the top of the page.

If the metafield isn't declared yet at all, see [Filter products by metafield](/filters/filter-options/filter-products-by-metafield.md) for the full declaration steps.

## Step 2: Add it to search relevance

1. Go to **Search > Settings**.
2. Under **Product fields to search**, check **Metafield**.
3. Drag it into the position that reflects how much weight it should carry in ranking.
4. Click **Save** in the bar at the top of the page.

## Related pages

* [Manage search fields](/search/manage-search-fields.md)
* [Filter products by metafield](/filters/filter-options/filter-products-by-metafield.md)
