search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

Refining Your Search Index with Swiftype Meta Tags

This tutorial will teach you how to use Swiftype's custom set of meta tags to control what our web crawler indexes as it moves through your website. It is divided into the following sections:

  1. What are Swiftype meta tags?
  2. Why are Swiftype meta tags useful?
  3. How are Swiftype meta tags formatted, and where do I place them on my page?
  4. What do Swiftype meta tags allow me to do?

1. What are Swiftype meta tags?

Much like Facebook and Google's open graph meta tags, Swiftype meta tags are placed in the <head> section of a web page and can contain information that is not rendered on the page. Swiftype meta tags speak directly to our web crawler and allow site owners to curate what fields and content comprise their website schema. While Google and Facebook have a set of acceptable meta tags that site owners can place on their site, Swiftype allows site owners to define their own meta tags on top of our default system fields (see below).

2. Why are Swiftype meta tags useful?

  • Swiftype meta tags allow you to control exactly how and what content gets indexed from your source code. By default, our web crawler will extract information from the following fields:

    • title (from the page's <title> tag)
    • body (from the page's content)
    • sections (from the page's <h1> to <h6> tags)

  • While this default setting will extract all of the content from your webpage, creating meta tags allows our crawler to collect this information in a highly organized, structured format. For example, you may want to specify that a certain part of a product page is the "price" instead of just a miscellaneous number within the larger body of text. Once this information is collected in a more structured format, you will have the power to tightly control your relevance algorithm (see weights in section 4) and give users the power to easily refine their search results (see facets and filters in section 4).

3. Where do I format/place them in my website template?

  • For this section, we are going to use our demo ecommerce store as an example (note that meta tags can be used across any type of website). Take a moment to look over the structure of the product page below:

Product Page

  • In this example, we'll want to exclude the header, sidebar, and footer from being indexed, since these elements are not directly relevant to the featured product shown and reappear across every product page on the website. This can be done by using content exclusion/inclusion tags at the template level of your website.

Product Page Mapped

  • Now, with these exclusion/inclusion tags in place, the red highlighted sections above will not be indexed by the web crawler. This is beneficial because without excluding these elements, any search query that includes a term from these template sections will return every single product page as a result.

  • From here, we can now decide what fields we want to extract from the remaining sections. In the red outlined sections below we can see what information we want to focus on.

Grainular Mapping

  • We've chosen to index the following attributes for each product (Note that we've chosen not to index quantity or add to cart, since these are only shopping options, not product features):

    1. title
    2. product description
    3. rating
    4. color
    5. size
    6. price
    7. product thumbnail

To index these pieces of information as their own fields, you need to create Swiftype meta tags for each element at the template level of your website (details here).

  • In addition to passing displayed product information to our web crawler, you can also create meta tags to pass our crawler information that doesn't appear on the page (meta-data), such as sales statistics/popularity, whether or not the product is in stock, keywords, or anything else you want to use to impact search results.

  • After adding your customizations, and before recrawling, it's possible to view the impact of meta tags on your search engine index with the Live Index Preview tool. The Live Index Preview tool lets you compare the elements and content that Swiftype has already indexed to your engine side-by-side with the modifications currently on your site. To access this tool, visit the Detail view of a page under the Content section of your dashboard. Then, click on the bolt icon to switch to Live Index Preview mode.

Live Preview Mode

  • The Live Preview Tool provides a greater degree of flexibility when making site changes. It allows you to immediately see the impact of changes in your search engine without having to wait for a recrawl to take place. Furthermore, site owners can trigger immediate recrawls of specific pages, allowing them to exercise granular control over their site index if making small changes to their site.

4. What do Swiftype meta tags allow me to do?


Once your website is crawled with these custom meta tags in place, it's possible to fine tune your search results in the weights tab of your Swiftype dashboard.

Weights Tab

In the column on the left, you'll see your default fields included in dropdown menus and located just above slider bars indicating the "impact" that each field has on returned search results. At the bottom of this list you'll find an option to add any additional or custom fields found in your engine schema to the overall factoring of the result score. Note that the default impact for custom fields is 1. You can test the output of different field weightings by entering a query in the search box on the right half of the frame and then adjust the desired sliders. As you re-adjust the weights, you will see the sample results re-order in real time.


Additionally, by creating meta tags to define specific attributes across your product set you'll have the power to let site visitors...

  • Change result sorting options (sort by relevance, price, name, rating, etc.)
  • Sort results by specific attributes (price, color, size, etc.)
  • Restrict search results to specific categories (men's clothing, women's clothing, etc.)

This type of navigation is referred to as faceted search. For an example of how each of these options works in our demo store, see the outlined red elements on the screenshots below. Then, for a detailed walkthrough on how to implement faceted search, you can visit our tutorial.

Faceting Example 01

Faceting Example 02

Faceting Example 03