---
title: "Search · Sanity × Nuxt UI"
description: "The search palette, its GROQ query and what it needs from the hosting."
canonical_url: "https://sanity-nuxtui.vercel.app/id/docs/search"
meta:
  "og:description": "The search palette, its GROQ query and what it needs from the hosting."
  "og:image": "https://sanity-nuxtui.vercel.app/_og/d/c_Page%2Ctitle_Search%2Cdescription_~VGhlIHNlYXJjaCBwYWxldHRlLCBpdHMgR1JPUSBxdWVyeSBhbmQgd2hhdCBpdCBuZWVkcyBmcm9tIHRoZSBob3N0aW5nLg%2Cheadline_Docs%2CsiteName_~U2FuaXR5IMOXIE51eHQgVUk%2Cp_Ii9pZC9kb2NzL3NlYXJjaCI%2Cs_hACeqzfXYvDp7Hpt.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Search · Sanity × Nuxt UI"
  "twitter:image": "https://sanity-nuxtui.vercel.app/_og/d/c_Page%2Ctitle_Search%2Cdescription_~VGhlIHNlYXJjaCBwYWxldHRlLCBpdHMgR1JPUSBxdWVyeSBhbmQgd2hhdCBpdCBuZWVkcyBmcm9tIHRoZSBob3N0aW5nLg%2Cheadline_Docs%2CsiteName_~U2FuaXR5IMOXIE51eHQgVUk%2Cp_Ii9pZC9kb2NzL3NlYXJjaCI%2Cs_hACeqzfXYvDp7Hpt.png"
---

> Index of every page on this site: [llms.txt](https://sanity-nuxtui.vercel.app/llms.txt)

Halaman ini belum tersedia dalam bahasa Indonesia.

[Docs](https://sanity-nuxtui.vercel.app/id/docs)

# **Search**

The search palette, its GROQ query and what it needs from the hosting.

The search button in the header, or Ctrl/⌘ + K, opens Nuxt UI's [**ContentSearch**](https://ui.nuxt.com/docs/components/content-search) palette. Editors can hide it in ****Site Settings → Header → Search****.

## How results are found

`SEARCH_QUERY` in `queries.ts` matches every word typed, as a prefix, against titles, excerpts, descriptions, rich text and block headings. Sanity ranks the results with `score()`, weighting title matches highest, and returns the top ten.

Results are limited to the language being viewed, plus untranslated pages when the fallback is on. Documents hidden from search engines are left out.

## Where it runs

`components/SiteSearch.vue` queries the Sanity CDN straight from the browser, with the published perspective and no token. There is no server endpoint, so search also works with a static build. This needs:

- a ****public**** dataset (the default), and
- the site's origin in the project's ****CORS**** settings.

Typing is debounced by 200 ms, and only the latest request updates the results.

## Customizing

- ****Fields searched or their weight****: edit the `match` and `boost()` terms in `SEARCH_QUERY`.
- ****What a result shows****: edit the projection at the end of the query and the mapping to `CommandPaletteItem` in `SiteSearch.vue`.
- ****Placeholder and empty text****: they come from the Nuxt UI locale, so they are translated already.

[**Visual Editing** Turn on the live preview in the Presentation tool, locally and in production.](https://sanity-nuxtui.vercel.app/id/docs/visual-editing) [**SEO and social images** Meta tags, sitemap, robots, structured data and the generated social images.](https://sanity-nuxtui.vercel.app/id/docs/seo-and-social-images)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://sanity-nuxtui.vercel.app/#website","@type":"WebSite","name":"Sanity × Nuxt UI","url":"https://sanity-nuxtui.vercel.app/","publisher":{"@id":"https://sanity-nuxtui.vercel.app/#identity"}},{"@id":"https://sanity-nuxtui.vercel.app/id/docs/search#webpage","dateModified":"2026-10-16T02:29:18Z","description":"The search palette, its GROQ query and what it needs from the hosting.","name":"Search","url":"https://sanity-nuxtui.vercel.app/id/docs/search","@type":["WebPage","SearchResultsPage"],"isPartOf":{"@id":"https://sanity-nuxtui.vercel.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://sanity-nuxtui.vercel.app/id/docs/search"]}]},{"@id":"https://sanity-nuxtui.vercel.app/#identity","@type":"Organization","name":"Sanity × Nuxt UI","url":"https://sanity-nuxtui.vercel.app"},{"@id":"https://sanity-nuxtui.vercel.app/id/docs/search#article","@type":"Article","dateModified":"2026-10-16T02:29:18Z","description":"The search palette, its GROQ query and what it needs from the hosting.","headline":"Search","inLanguage":"en","thumbnailUrl":"https://sanity-nuxtui.vercel.app/_og/d/c_Page%2Ctitle_Search%2Cdescription_~VGhlIHNlYXJjaCBwYWxldHRlLCBpdHMgR1JPUSBxdWVyeSBhbmQgd2hhdCBpdCBuZWVkcyBmcm9tIHRoZSBob3N0aW5nLg%2Cheadline_Docs%2CsiteName_~U2FuaXR5IMOXIE51eHQgVUk%2Cp_Ii9pZC9kb2NzL3NlYXJjaCI%2Cs_hACeqzfXYvDp7Hpt.png","author":{"@id":"https://sanity-nuxtui.vercel.app/#identity"},"image":{"@id":"https://sanity-nuxtui.vercel.app/#/schema/image/1"},"isPartOf":{"@id":"https://sanity-nuxtui.vercel.app/id/docs/search#webpage"},"mainEntityOfPage":{"@id":"https://sanity-nuxtui.vercel.app/id/docs/search#webpage"},"publisher":{"@id":"https://sanity-nuxtui.vercel.app/#identity"}},{"@id":"https://sanity-nuxtui.vercel.app/#/schema/image/1","@type":"ImageObject","contentUrl":"https://sanity-nuxtui.vercel.app/_og/d/c_Page%2Ctitle_Search%2Cdescription_~VGhlIHNlYXJjaCBwYWxldHRlLCBpdHMgR1JPUSBxdWVyeSBhbmQgd2hhdCBpdCBuZWVkcyBmcm9tIHRoZSBob3N0aW5nLg%2Cheadline_Docs%2CsiteName_~U2FuaXR5IMOXIE51eHQgVUk%2Cp_Ii9pZC9kb2NzL3NlYXJjaCI%2Cs_hACeqzfXYvDp7Hpt.png","inLanguage":"en","url":"https://sanity-nuxtui.vercel.app/_og/d/c_Page%2Ctitle_Search%2Cdescription_~VGhlIHNlYXJjaCBwYWxldHRlLCBpdHMgR1JPUSBxdWVyeSBhbmQgd2hhdCBpdCBuZWVkcyBmcm9tIHRoZSBob3N0aW5nLg%2Cheadline_Docs%2CsiteName_~U2FuaXR5IMOXIE51eHQgVUk%2Cp_Ii9pZC9kb2NzL3NlYXJjaCI%2Cs_hACeqzfXYvDp7Hpt.png"}]}
```

## Sitemap

See the full [sitemap](https://sanity-nuxtui.vercel.app/sitemap.md) for all pages.
