Documentation ¶
Overview ¶
Package algolia contains logic for working with Algolia.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { *search.Client // Docs is an Algolia index for searching documents. Docs *search.Index // DocsCreatedTimeAsc is an Algolia replica of the docs index that is sorted // by ascending created time. DocsCreatedTimeAsc *search.Index // DocsCreatedTimeDesc is an Algolia replica of the docs index that is sorted // by descending created time. DocsCreatedTimeDesc *search.Index // DocsModifiedTimeDesc is an Algolia replica of the docs index that is sorted // by descending modified time. DocsModifiedTimeDesc *search.Index // Drafts is an Algolia index for storing metadata for draft documents. Drafts *search.Index // DraftsCreatedTimeAsc is an Algolia replica of the drafts index that is sorted // by ascending created time. DraftsCreatedTimeAsc *search.Index // DraftsCreatedTimeDesc is an Algolia replica of the drafts index that is sorted // by descending created time. DraftsCreatedTimeDesc *search.Index // DraftsModifiedTimeDesc is an Algolia replica of the drafts index that is sorted // by descending modified time. DraftsModifiedTimeDesc *search.Index // Internal is an Algolia index for storing internal Hermes metadata. Internal *search.Index // Links is an Algolia index for storing links of documents Links *search.Index // MissingFields is an Algolia index for storing missing fields from indexed // documents. MissingFields *search.Index }
Client provides access to Hermes indexes in Algolia.
func NewSearchClient ¶
NewSearchClient returns a new Algolia client for searching indices.
type Config ¶
type Config struct { // ApplicationID is the Algolia Application ID. ApplicationID string `hcl:"application_id,optional"` // DocsIndexName is the name of the Algolia index for storing document // metadata. DocsIndexName string `hcl:"docs_index_name,optional"` // DraftsIndexName is the name of the Algolia index for storing draft // documents' metadata. DraftsIndexName string `hcl:"drafts_index_name,optional"` // InternalIndexName is the name of the Algolia index for storing internal // Hermes metadata. InternalIndexName string `hcl:"internal_index_name,optional"` // LinksIndexName is the name of the Algolia index for storing links LinksIndexName string `hcl:"links_index_name,optional"` // MissingFieldsIndexName is the name of the Algolia index for storing missing // fields from indexed documents. MissingFieldsIndexName string `hcl:"missing_fields_index_name,optional"` // SearchAPIKey is the Algolia API Key for searching Hermes indices. SearchAPIKey string `hcl:"search_api_key,optional"` // WriteAPIKey is the Algolia API Key for writing to Hermes indices. WriteAPIKey string `hcl:"write_api_key,optional"` }
Config is the configuration for interacting with the Algolia API.
Click to show internal directories.
Click to hide internal directories.