Skip to content

427 - Search Config

Search engine index configuration. This is an example of a MAML document.

maml
{
  engine: "elasticsearch"
  connection: {
    host: "localhost:7700"
    api_key: "kPLL99PHjz2Shpa9smj9U8jJ7tCQAyCM"
    timeout: 4017
  }

  # Index settings
  index: {
    name: "resource"
    primary_key: "id"
    searchable: [
      "title"
      "description"
      "content"
    ]
    filterable: [
      "category"
      "status"
      "date"
    ]
    sortable: [
      "date"
      "relevance"
    ]
  }

  synonyms: {
    js: [
      "javascript"
      "ecmascript"
    ]
    ts: [
      "typescript"
    ]
  }
}

See Also