JSPM

  • Created
  • Published
  • Downloads 9430
  • Score
    100M100P100Q127360F
  • License Apache-2.0

A suite of react components to help create a UI quickly for elasticsearch

Package Exports

  • searchkit

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (searchkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

What is Searchkit?

Searchkit is a suite of UI components built in react. The aim is rapidly create beautiful search applications using declarative components, and without being an ElasticSearch expert.

npm version Join the chat at https://gitter.im/searchkit/searchkit Coverage Status

See full Documentation or Getting Started

Quick Intro

Live demo

const host = "https://kili-eu-west-1.searchly.com/movies/"
const searchkit = new SearchkitManager(host, {
  basicAuth:"read:teetndhjnrspbzxxyfxmf5fb24suqxuj"
})

const App = ()=> (
  <SearchkitProvider searchkit={searchkit}>
    <div>
      <div className="example-search-site__query">
        <SearchBox
         autofocus={true}
         searchOnChange={true}
         prefixQueryFields={["actors^1","type^2","languages","title^10"]}/>
      </div>
      <div className="example-search-site__applied-filters">
        <SelectedFilters/>
        <ResetFilters/>
        <HitsStats/>
      </div>
      <div className="example-search-site__filters">
        <HierarchicalMenuFilter
          fields={["type.raw", "genres.raw"]}
          title="Categories"
          id="categories"/>
        <RefinementListFilter
          id="actors"
          title="Actors"
          field="actors.raw"
          operator="AND"
          size={10}/>
      </div>
      <div className="example-search-site__results">
        <Hits hitsPerPage={10}/>
        <NoHits/>
      </div>
    </div>
  </SearchkitProvider>
)

ReactDOM.render(<App/>, document.getElementById('root'))