
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
searchkitmod
Advanced tools
Searchkit is an open source toolkit which helps you build a great search experience with Elasticsearch.
Searchkit is an open source toolkit which helps you build a great search experience with Elasticsearch.
Searchkit is a Graph QL / React UI Component framework to:

Read our blog post about Searchkit V3
For those who currently use Searchkit Classic, here are quicklinks to codebase & Docs
From a configuration
const searchkitConfig = {
host: 'http://localhost:9200/', // elasticsearch instance url
index: 'movies',
hits: {
fields: [ 'title', 'plot', 'poster' ]
},
query: new MultiMatchQuery({
fields: [ 'plot','title^4']
}),
facets: [
new RefinementSelectFacet({
identifier: 'type',
field: 'type.raw',
label: 'Type'
}),
new RefinementSelectFacet({
identifier: 'writers',
field: 'writers.raw',
label: 'Writers',
multipleSelect: true
}),
new RangeFacet({
identifier: 'metascore',
field: 'metaScore',
label: 'Metascore',
range: {
min: 0,
max: 100,
interval: 5
}
}),
new DateRangeFacet({
identifier: 'released',
field: 'released',
label: 'Released'
})
]
}
const { typeDefs, withSearchkitResolvers, context } = SearchkitSchema({
config: searchkitConfig,
typeName: 'ResultSet',
hitTypeName: 'ResultHit',
addToQueryType: true
})
const server = new ApolloServer({
typeDefs: [
gql`
type Query {
root: String
}
type HitFields {
title: String
}
type ResultHit implements SKHit {
id: ID!
fields: HitFields
}
`, ...typeDefs
],
resolvers: withSearchkitResolvers({}),
introspection: true,
playground: true,
context: {
...context
}
})
Will provide a GraphQL API where you can perform queries like:
{
results(query: "heat") {
hits {
items {
... on ResultHit {
id
fields {
title
}
}
}
}
}
}
{
results(query: "heat") {
facets {
identifier
label
type
display
entries {
id
label
count
}
}
hits {
items {
id
fields {
title
}
}
}
}
}
{
results(filters: [{identifier: "type", value: "Movie"}, {identifier: "metascore", min: 30}]) {
summary {
appliedFilters {
identifier
id
label
display
... on ValueSelectedFilter {
value
}
}
}
facets {
identifier
label
type
display
entries {
id
label
count
}
}
hits {
items {
... on ResultHit {
id
fields {
title
}
}
}
}
}
}
See Schema Query Guide for more examples.
We provide a thin React client which integrates with Searchkit's API, Apollo Client. It maintains search state (pagination, filtering and querying) and calls Apollo client to fetch.
import {
FacetsList,
SearchBar,
Pagination,
ResetSearchButton,
SelectedFilters
} from '@searchkit/elastic-ui'
const Page = () => {
const variables = useSearchkitVariables()
const { data, loading } = useQuery(query, { variables })
const [viewType, setViewType] = useState('list')
const Facets = FacetsList([])
return (
<EuiPage>
<EuiPageSideBar>
<SearchBar loading={loading} />
<EuiHorizontalRule margin="m" />
<Facets data={data?.results} loading={loading} />
</EuiPageSideBar>
<EuiPageBody component="div">
<EuiPageHeader>
<EuiPageHeaderSection>
<EuiTitle size="l">
<SelectedFilters data={data?.results} loading={loading} />
</EuiTitle>
</EuiPageHeaderSection>
<EuiPageHeaderSection>
<ResetSearchButton loading={loading} />
</EuiPageHeaderSection>
</EuiPageHeader>
<EuiPageContent>
<EuiPageContentHeader>
<EuiPageContentHeaderSection>
<EuiTitle size="s">
<h2>{data?.results.summary.total} Results</h2>
</EuiTitle>
</EuiPageContentHeaderSection>
<EuiPageContentHeaderSection>
<EuiButtonGroup
options={[
{
id: `grid`,
label: 'Grid'
},
{
id: `list`,
label: 'List'
}
]}
idSelected={viewType}
onChange={(id) => setViewType(id)}
/>
</EuiPageContentHeaderSection>
</EuiPageContentHeader>
<EuiPageContentBody>
{viewType === 'grid' ? <HitsGrid data={data} /> : <HitsList data={data} />}
<EuiFlexGroup justifyContent="spaceAround">
<Pagination data={data?.results} />
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</EuiPageBody>
</EuiPage>
)
}
See quickstart guide
QBOX Elasticsearch hosting. They have kindly provided us an elasticsearch instance for our demo site.
Searchkit has undergone a total rewrite so whilst it should be straightforward to move onto, any code written for searchkit legacy wouldn't work on Searchkit v3.
No! You dont expose your elasticsearch cluster to the browser, Search API sits in between elasticsearch and the browser.
No! Searchkit API provides a dev friendly search API. Searchkit simplifies using elasticsearch for search so that you can build your own UI components very easily. If your apps dont use react or you are building a native mobile app, you can just use the searchkit API. See our blog article for more information
FAQs
Searchkit is an open source toolkit which helps you build a great search experience with Elasticsearch.
We found that searchkitmod demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.