Skip to content
Jon Winton edited this page Jun 5, 2017 · 1 revision

What happens at setup?

  • Connect to the Elastic Search instance and create a client for communication
  • Loads the two internally controlled mappings: sites and pages
  • Grabs the mappings and handlers for your indices
  • Creates all the indices

First let's talk about the configuration options passed in and then we'll move to the order of things.

Options

The following options are passed in:

  • prefix: a string that can be assigned to prefix all indices and aliases (optional)
  • db: a reference to the DB that Amphora is using (required)
  • sites: a reference to the sites service exposed in Amphora (required)
  • mappings: A path string to a directory containing YAML files that are valid Elastic Search mappings (optional)
  • handlers: A path string to a directory containing JS modules that will handle the actual indexing of the data (optional)

The mappings and handlers options are optional because Amphora Search will create and manage the Pages and Sites indices on its own but you may not need any other feeds. Until you decide to create feeds you can still use this module.

Next we'll talk about index creation.

Clone this wiki locally