Numeric Production Mechanism

    @elastic/search-ui
    TypeScript icon, indicating that this package has built-in type declarations

    1.14.0 • Public • Published

    search-ui

    Part of the Search UI project.

    The "Headless Search UI" that serves as a foundation for the react-search-ui library.

    If you are not using React, this library can be used in conjunction with any other framework. Instead of working with components as you do in React, you simply work directly with state and actions. These are documented in the State and Actions sections of the documentation.

    You'll get all of the benefit of Search UI, just with no view. The view is up to you.

    Usage

    npm install --save @elastic/search-ui
    import { SearchDriver } from "@elastic/search-ui";
    import AppSearchAPIConnector from "@elastic/search-ui-app-search-connector";
    
    const connector = new AppSearchAPIConnector({
      searchKey: "search-371auk61r2bwqtdzocdgutmg",
      engineName: "search-ui-examples",
      hostIdentifier: "host-2376rb"
    });
    
    const config = {
      apiConnector: connector
    };
    
    const driver = new SearchDriver(config);
    
    driver.subscribeToStateChanges((state) =>
      console.log(`Received ${state.totalResults} results for your search!`)
    );
    
    driver.getActions().setSearchTerm("canyon");
    
    // Received 8 results for your search!

    Configuration

    All configuration is documented in the Configuration section of the Advanced README.

    SearchDriver Usage

    Methods

    method params return description
    subscribeToStateChanges function Function to execute when state changes. ex.

    (state) => {}
    getActions Actions All available actions.
    getState State Current state.

    Keywords

    none

    Install

    npm i @elastic/search-ui

    DownloadsWeekly Downloads

    10,737

    Version

    1.14.0

    License

    Apache-2.0

    Unpacked Size

    406 kB

    Total Files

    199

    Last publish

    Collaborators

    • colleen.mcginnis
    • sethmlarson
    • scottybollinger
    • kyrspl
    • dlemechko
    • kilodelta
    • elasticthomaskim
    • geekbydefault
    • phoey1
    • verogo
    • brianvans
    • breehall
    • trevorpierce
    • glitteringkatie
    • chandlerprall
    • snide
    • chrisronline
    • cchaos
    • jen-huang
    • spalger
    • delvedor
    • courtewing
    • lukasolson
    • ccowan
    • cjcenizal
    • jbudz
    • tylersmalley
    • thomasneirynck
    • weltenwort
    • pugnascotia
    • zinckiwi
    • brandon.kobel
    • nreese
    • elasticdog
    • mgreau
    • fatmcgav
    • mindbat
    • itsmed
    • tylerjl
    • chris.koehnke.at.elastic
    • jonahbull
    • jarpy
    • leathekd
    • drewr
    • nyurik
    • crazybus
    • lukeelmers
    • ddillinger
    • joshdover
    • jasonstoltz
    • bamieh
    • markov00
    • thompsongl
    • ryan.haywood
    • olksdr
    • fxdgear
    • joshmock
    • vignesh.shanmugam
    • watson
    • rhodesjason
    • nik9000
    • jmlrt
    • eliperelman
    • mattkime
    • constancecchen
    • yakhinvadim
    • afoucret
    • nickpeihl
    • axw
    • mistic
    • elasticmachine
    • gtback
    • johannes.reuter.elastic
    • pickypg
    • gmmorris
    • richard.kuzsma
    • alanstorm
    • trentm
    • andrewvc-elastic
    • jorge.sanz
    • stratoula
    • nkammah
    • streamich
    • nickofthyme
    • chloeruka