How to use @elastic/search-ui-app-search-connector - 1 common examples

To help you get started, we’ve selected a few @elastic/search-ui-app-search-connector examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elastic / search-ui / examples / sandbox / src / App.js View on Github external
{
    name: "Title",
    value: "title",
    direction: "asc"
  }
];

let connector;
if (process.env.REACT_APP_SOURCE === "SITE_SEARCH") {
  connector = new SiteSearchAPIConnector({
    engineKey:
      process.env.REACT_SITE_SEARCH_ENGINE_KEY || "Z43R5U3HiDsDgpKawZkA",
    documentType: process.env.REACT_SITE_SEARCH_ENGINE_NAME || "national-parks"
  });
} else {
  connector = new AppSearchAPIConnector({
    searchKey:
      process.env.REACT_APP_SEARCH_KEY || "search-371auk61r2bwqtdzocdgutmg",
    engineName:
      process.env.REACT_APP_SEARCH_ENGINE_NAME || "search-ui-examples",
    hostIdentifier:
      process.env.REACT_APP_SEARCH_HOST_IDENTIFIER || "host-2376rb",
    endpointBase: process.env.REACT_APP_SEARCH_ENDPOINT_BASE || ""
  });
}

const config = {
  alwaysSearchOnInitialLoad: true,
  searchQuery: {
    result_fields: {
      visitors: { raw: {} },
      world_heritage_site: { raw: {} },

@elastic/search-ui-app-search-connector

⚠️ DEPRECATED. Please use '@elastic/search-ui-elasticsearch-connector'.

Apache-2.0
Latest version published 25 days ago

Package Health Score

87 / 100
Full package analysis

Popular @elastic/search-ui-app-search-connector functions

Similar packages