Data-swiftype-name metadata not being saved if it's outside of a true data-swiftype-index area?

meta-tags
crawler

#1

We have a site that shows breadcrumbs outlining the parents of the current page. We don’t want to have this area crawled, since it could return false positives, but we do want to store it in the meta data for each page, so we can display the breadcrumb in search results, separate from the body text that got a hit. However, it looks like, since it’s outside of the crawlable area, it’s not getting stored.

Here’s an example:

<div id="breadcrumb" data-swiftype-name="breadcrumb" data-swiftype-type="text">[breadcrumb text]</div>
<div id="content" data-swiftype-index="true">
    [body copy]
</div>

We do, however, have some pages where the breadcrumb is in the crawlable area, and “breadcrumb” is an available field for these pages in the results and displays as desired. Like this:

<div id="content" data-swiftype-index="true">
    <div id="breadcrumb" data-swiftype-name="breadcrumb" data-swiftype-type="text">[breadcrumb text]</div>
    [body copy]
</div>

So, my question is, is metadata not being saved if it is outside of the realm of the crawlable area? I would think that calling it out by using the data-swiftype-name attribute would cause it to be saved, but maybe there’s a contradiction since we’re also specifying where Swiftype should crawl.

Thanks!


#2

Hey there!

Body-embedded meta tags should get picked up by the Crawler regardless of whether they are contained within a data-swiftype-index area or not.

It’s possible that there is a data-type mismatch on your pages’ meta tags, preventing them from being updated in the index.
Our Crawler also has a set of meta tags it uses by default (you can view the default fields our Crawler uses here: https://swiftype.com/documentation/crawler)

If the data-type of a meta tag is not the same as when it was initially indexed by the crawler, or the data-type of a default field has been changed, it will prevent the page from being re-indexed.