Custom search records
Search records can be independently managed via the Search API. You may also explicitly define search records at the same time content is posted.
This can be useful for more control over structured data (e.g title/summary/content/filterable attributes) rather than relying on the content extractors.
Using the Search API
See the Getting Started section first to ensure you can authenticate and make successful API connections.
Check index status
Use this endpoint to check index size, outstanding tasks, and basic configuration. For example:
Creating new records
Use this endpoint to create or update search records. Mandatory keys are title
, url
and content
.
Provide an array of search records. For example consider a search-records.json
file containing the following:
An example curl request:
Make an attribute filterable (facet support)
As above, search records may contain attributes you may wish to filter on (for example, categories
and tags
). Let the Search API know about new attributes like so:
Deleting an individual record
Use the DELETE
method combined with a Quant-Url
header to remove an item from the index.
Clear entire index
Use the DELETE
method to clear the entire search index. For example:
Custom search record when posting content
Simply include a search_record
object in your content payload structure. For example:
Supported keys
title
: Used both as a searchable attribute and the title used in search resultssummary
: Used both as a searchable attribute and the content snippet displayed in the search results.content
: Used as a searchable attribute. May contain markup (tags will be stripped). May be a large content body (e.g could be the entire page content).image
: Used on some search result displays when available. Should be a full URL to an image.categories
: An object containing any number of categories with an array of terms. Allows for faceting and filtering.
All keys within search_record
are optional. The configured extractors will attempt to determine content as a fallback.
Search records can be updated independently of content. This means even if the static content MD5 is unchanged the record will still be updated in the search index.