Structure

Decide which fields are searchable before you build search

Most CMS platforms let you add search without configuration. That doesn't mean it works well. The default index usually grabs every text field in your content model — titles, body copy, excerpts, meta descriptions, alt text, tags, sometimes even internal notes. Users searching for "policy" get results polluted by image alt text and SEO descriptions that happened to mention the word.

Not every field belongs in search results

Some fields exist for structure, not discovery. Category slugs. Revision notes. Admin labels. Author bios. When these leak into search indexes, they dilute relevance. A user searching for "contact" shouldn't surface every page where the footer contains a contact link.

Before you enable search, list every content field in your system. Mark which ones users should be able to search. Title: yes. Body copy: yes. Meta description: usually no. Alt text: rarely. Tag names: depends on whether your tags are user-facing vocabulary or internal taxonomy.

Weighting matters more than inclusion

Not all searchable fields deserve equal priority. A match in the page title is more relevant than a match in the body. A match in a heading is more relevant than a match in a footnote. Most search systems let you assign weights to fields. Use them.

Set title weight highest. Headings next. Body copy after that. If you're indexing excerpts or summaries, weight them between headings and body. Don't index a field and then wonder why irrelevant pages rank first — that's a weighting problem you created.

Decide what to exclude, not just what to include

Some content types shouldn't appear in search at all. Error pages. Redirect placeholders. Draft templates. Test content. Search results pages themselves. These pages exist in your CMS, but users searching your site don't need to find them.

Mark content types as non-searchable at the model level if your CMS allows it. If not, filter them out when you build the index. This is structural work, not a search optimization task. Do it before you have 500 pages and a polluted index.

Test with real queries, not assumptions

After you configure which fields are searchable, test the index with queries your users actually run. Not ideal queries — real ones. If your analytics show users searching for "pricing" and your search returns blog posts that mention pricing instead of your pricing page, your weights are wrong or your exclusions are incomplete.

Search configuration isn't a one-time setup. As your content model changes, your search index needs adjustment. Add a new content type, decide if it's searchable. Add a new field, decide if it belongs in the index. This is structural work that happens before users notice search is broken.

You control what search finds. Decide which fields matter, set their weights, exclude what doesn't belong, and test with real queries. Default indexing isn't a feature — it's a decision you didn't make yet.

← All posts