Search, made easy.

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,
},
});

Typescript SDK for Search

Works on the browser or Node.js. Integrates easily into your application.

yarn add @searchkit/sdk

SDK designed for Search UI

Its extremely quick to integrate Elasticsearch into your API or frontend app.

Faceted Search made Simple

Searchkit provides filtering on text, numbers and dates.

Client Friendly

All the heavy lifting is done by the SDK, making it easy to integrate your React website or Swift iOS App.

Flexible Customisation

Easily extend and add your own facets. Write your own resolvers to provide information that comes from other sources, not just from elasticsearch.

Out the box React Components

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 {
identifier
label
type
display
entries {
label
count
}
}
hits {
items {
id
fields {
title
writers
actors
}
}
}
}
}

GraphQL Integration

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

API designed for Search UI

With Apollo, Elasticsearch and Searchkit's resolvers, its extremely quick to build a capable dev friendly search API.

Faceted Search made Simple

Searchkit provides filtering on text, numbers and dates.

Client Friendly

All the heavy lifting is done by the API, making it easy to integrate your React website or Swift iOS App.

Flexible Customisation

Easily extend and add your own facets. Write your own resolvers to provide information that comes from other sources, not just from elasticsearch.

Quick to get Started

Searchkit has example starter apps for you to get started really quickly.