Searchkit is an open source library which helps you build a great search experience with Elasticsearch.
const searchkitConfig = {host: 'http://demo.searchkit.co/api/',index: 'movies',hits: {fields: [ 'title', 'plot', 'poster' ]},query: new MultiMatchQuery({fields: [ 'plot','title^4']}),facets: [new RefinementSelectFacet({field: 'type.raw',identifier: 'type',label: 'Type',multipleSelect: true}),new RangeFacet({field: 'metaScore',identifier: 'metascore',label: 'Metascore',range: {min: 0,max: 100,interval: 5}}),new DateRangeFacet({field: 'released',identifier: 'released',label: 'Released'})]}const request = Searchkit(config);const response = await request.setFilters([{identifier: 'type', value: 'movie'}]).execute({hits: {size: 10,from: 0,},});
Works on the browser or Node.js. Integrates easily into your application.
yarn add @searchkit/sdk
Its extremely quick to integrate Elasticsearch into your API or frontend app.
Searchkit provides filtering on text, numbers and dates.
All the heavy lifting is done by the SDK, making it easy to integrate your React website or Swift iOS App.
Easily extend and add your own facets. Write your own resolvers to provide information that comes from other sources, not just from elasticsearch.
For those who want a search UI quickly, Searchkit provides UI components out the box which work with Searchkit's API to bring a great search experience to your app. Searchkit components leverages Elastic's EUI react components.
yarn add @searchkit/sdk @searchkit/client @searchkit/elastic-ui @elastic/eui
const searchkitConfig = {host: 'http://demo.searchkit.co/api/',index: 'movies',hits: {fields: [ 'title', 'plot', 'poster' ]},query: new MultiMatchQuery({fields: [ 'plot','title^4']}),facets: [new RefinementSelectFacet({field: 'type.raw',identifier: 'type',label: 'Type'}),new RefinementSelectFacet({field: 'writers.raw',identifier: 'writers',label: 'Writers',multipleSelect: true}),new RangeFacet({field: 'metaScore',identifier: 'metascore',label: 'Metascore',range: {min: 0,max: 100,interval: 5}}),new DateRangeFacet({field: 'released',identifier: 'released',label: 'Released'})]}
{results(query: "heat",filters: [{id: "type",value: "movie"}]) {facets {identifierlabeltypedisplayentries {labelcount}}hits {items {idfields {titlewritersactors}}}}}
Searchkit GraphQL resolvers saves building a search focused API with common use cases such as facet filtering, pagination and querying.
yarn add @searchkit/schema apollo-server
With Apollo, Elasticsearch and Searchkit's resolvers, its extremely quick to build a capable dev friendly search API.
Searchkit provides filtering on text, numbers and dates.
All the heavy lifting is done by the API, making it easy to integrate your React website or Swift iOS App.
Easily extend and add your own facets. Write your own resolvers to provide information that comes from other sources, not just from elasticsearch.
Searchkit has example starter apps for you to get started really quickly.