Can you add custom fields to crawled pages?

I’m working on building a search engine for a site where the bulk of the site will be content of a particular nature, and so it seems simpler to use the crawling features of Swiftype.

However, I also want to store some keyword arrays and geolocation data for various pages to aid in more advanced searches. Is there a way to use the standard Pages document type for this? Or would I have to abandon the crawler-based document type and use the totally custom API implementation?

You absolutely can! Our meta tags feature allows you to easily create unique fields and build out your custom data structure.

To build out arrays for keywords or other data types, you’ll want to create a unique tag for each value. For example:

<meta class="swiftype" name="keywords" data-type="string" content="keyword_1" />
<meta class="swiftype" name="keywords" data-type="string" content="keyword_2" />

When those tags are crawled and indexed, Swiftype will build the array for the keywords field of that page document.

The same approach can also be taken when indexing geolocation data.