index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/sanity-io/sanity/test/e2e/tests | petrpan-code/sanity-io/sanity/test/e2e/tests/desk/inspectors.spec.ts | /* eslint-disable max-nested-callbacks */
import {test, expect} from '@playwright/test'
import {createUniqueDocument, withDefaultClient} from '../../helpers'
withDefaultClient((context) => {
test.describe.skip('sanity/desk: document inspectors', () => {
test('open and close custom inspector', async ({page}) => {... | 4,600 |
0 | petrpan-code/sanity-io/sanity/test/e2e/tests | petrpan-code/sanity-io/sanity/test/e2e/tests/inputs/text.spec.ts | /* eslint-disable max-nested-callbacks */
/**
* TODO: This need to refactored once we have a better e2e framework/setup in place.
* Makeshift code to reproduce a specific bug.
*/
import {test, expect} from '@playwright/test'
import {withDefaultClient} from '../../helpers'
const kanji = `
速ヒマヤレ誌相ルなあね日諸せ変評ホ真攻同潔ク作先た員勝... | 4,601 |
0 | petrpan-code/sanity-io/sanity/test | petrpan-code/sanity-io/sanity/test/mocks/emptyObject.ts | export default {}
| 4,602 |
0 | petrpan-code/sanity-io/sanity/test | petrpan-code/sanity-io/sanity/test/mocks/undefined.ts | export default undefined
| 4,603 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.editorconfig | # http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
| 4,604 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.eslintignore | packages/**/**/node_modules/**/**
packages/**/lib
packages/**/**/build
docs/**
examples/**
| 4,605 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.eslintrc.js | module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: ["custom"],
settings: {
next: {
rootDir: ["apps/*/"],
},
},
};
| 4,606 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.npmignore | node_modules
test/e2e/generated
npm-debug.log
lib/__test__
$CIRCLE_TEST_REPORTS
dist
cypress
_book
coverage
test-report.xml | 4,607 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.prettierignore | packages/**/**/coverage/**/**
packages/**/**/es/**/**
packages/**/**/lib/**/**
packages/**/**/release/**/**
packages/**/**/umd/**/**
packages/**/**/dist/**/** | 4,608 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.prettierrc | {
"arrowParens": "always",
"bracketSpacing": true,
"parser": "typescript",
"printWidth": 100,
"quoteProps": "consistent",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
} | 4,609 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/.yarnrc | workspaces-experimental true
| 4,610 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/CODE_OF_CONDUCT.md | # Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex ch... | 4,611 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/CONTRIBUTING.md | # Contributing to Searchkit
There are a lot of different ways to contribute to Searchkit. See below for
everything you can do and the processes to follow for each contribution method.
Note that no matter how you contribute, your participation is governed by our
[Code of Conduct](CODE_OF_CONDUCT.md).
If you want to be... | 4,612 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/COPYRIGHT | Copyright 2015-2016, Ten Eleven Ltd.
All rights reserved.
This source code is licensed under the Apache 2.0 license found in the
LICENSE file in the root directory of this source tree.
@providesModule Searchkit
| 4,613 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/DEVELOPMENT.md | ## Setting up a development environment
Requirements:
- [Node.js](https://nodejs.org/en/) (v16.18.1 or higher)
- [Yarn](https://yarnpkg.com/) (v1.22.15 or higher)
1. Clone the repository and install dependencies:
```bash
yarn
```
2. Build the project:
```bash
yarn build
```
## Running Tests
We use [Jest](https:/... | 4,614 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/LICENCE | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the c... | 4,615 |
0 | petrpan-code/searchkit | petrpan-code/searchkit/searchkit/README.md | # Elasticsearch Search UI Components
Searchkit is an open source library which helps you build a great search experience with **Elasticsearch**.
Works with Javascript, React, Vue, Angular, and more.
[](https://badge.fury.io/js/searchkit) .IConfig} */
module.exports = {
siteUrl: 'https://www.searchkit.co'
} | 4,626 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/next.config.js | // const withTM = require("next-transpile-modules")(["@searchkit/api", "@searchkit/api"]);
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.js',
unstable_staticImage: true,
flexsearch: {
codeblocks: false
},
})
module.exports = withNextra({
async redirects... | 4,627 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/package.json | {
"name": "web",
"version": "0.0.13",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"postbuild": "next-sitemap",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@algolia/autocomplete-js": "^1.9.2",
"@algolia/autocomplete-theme-classic": ... | 4,628 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/postcss.config.js | module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
} | 4,629 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/styles.css | .ais-Breadcrumb-list,
.ais-CurrentRefinements-list,
.ais-HierarchicalMenu-list,
.ais-Hits-list,
.ais-Results-list,
.ais-InfiniteHits-list,
.ais-InfiniteResults-list,
.ais-Menu-list,
.ais-NumericMenu-list,
.ais-Pagination-list,
.ais-RatingMenu-list,
.ais-RefinementList-list,
.ais-ToggleRefinement-list {
margin: 0;
p... | 4,630 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/tailwind.config.js | module.exports = {
darkMode: 'class',
content: [
"./components/**/*.{js,tsx}",
"./pages/**/*.{md,mdx}",
'./pages/*.{jsx,tsx,js}',
"./theme.config.js",
],
}; | 4,631 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/theme.config.js | import { Discord, Github } from "./components/Social";
import { useRouter } from 'next/router'
import { useConfig } from 'nextra-theme-docs'
// eslint-disable-next-line import/no-anonymous-default-export
export default {
project: { link: 'https://github.com/searchkit/searchkit'}, // GitHub link in the navbar
docsR... | 4,632 |
0 | petrpan-code/searchkit/searchkit/apps | petrpan-code/searchkit/searchkit/apps/web/tsconfig.json | {
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Next.js",
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit":... | 4,633 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/components/Social.tsx | import { DiscordIcon, GitHubIcon } from "nextra/icons";
function Github() {
return (
<a
href="https://github.com/searchkit/searchkit"
className="hidden text-current sm:flex hover:opacity-75"
title="Searchkit GitHub repo"
target="_blank"
rel="noreferrer"
>
{/* Nextra icons ... | 4,634 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/components/Tabs.tsx | import type { FC, ReactElement } from "react";
import { Tabs as NextraTabs, Tab } from "nextra-theme-docs";
import useSWR from "swr";
export { Tab };
export const Tabs: FC<{
storageKey?: string;
items: string[];
children: React.ReactNode;
}> = function ({ storageKey = "tab-index", items, children = null, ...pr... | 4,635 |
0 | petrpan-code/searchkit/searchkit/apps/web/components | petrpan-code/searchkit/searchkit/apps/web/components/promo-page/FeatureBreakout.tsx | import Image from 'next/image'
export const FeatureBreakout = ({ title, description, linkTitle, linkHref, image, subtext, snippets }: any) => {
return (
<div className="py-6 mx-auto container sm:mt-8 relative">
<div className="grid grid-cols-12 gap-4">
<div className="lg:col-span-8 col-span-12 lg:p... | 4,636 |
0 | petrpan-code/searchkit/searchkit/apps/web/components | petrpan-code/searchkit/searchkit/apps/web/components/promo-page/IntroButtons.tsx |
export const IntroButtons = () => {
return (
<div className="mt-5 pb-8 mx-auto sm:flex sm:justify-center lg:justify-start lg:mx-0 md:mt-8">
<div className="rounded-md shadow">
<a className="w-full flex items-center no-underline justify-center px-8 py-3 border border-transparent text-base leading-6... | 4,637 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/404.mdx | Sorry, the content you are looking for is not available.
Not found what you're looking for? Try asking on [Discord](https://discord.gg/CRuWmSQZQx) or on [Github Issues](https://github.com/searchkit/searchkit/issues)
Looking for the old docs? [Searchkit V3 Docs](https://v3.searchkit.co/) | 4,638 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/_app.js | import "../styles/globals.css";
import "../styles.css";
import 'nextra-theme-docs/style.css'
import "@algolia/autocomplete-theme-classic";
import Script from "next/script";
import { useRouter } from "next/router";
import { useEffect } from "react";
const App = ({ Component, pageProps }) => {
const getLayout = Compon... | 4,639 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/_meta.json | {
"*": {
"type": "page"
},
"index": {
"display": "hidden",
"title": "Home",
"type": "page",
"theme": {
"sidebar": false,
"toc": true,
"layout": "raw"
}
},
"docs": {
"title": "Docs",
"type": "page"
},
"demos": {
"title": "Demos",
"type": "page"
},... | 4,640 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/about.mdx | ---
title: About Searchkit
---
## About Searchkit
Searchkit is an open-source library for building search experiences with Elasticsearch fast!. Searchkit was first released in 2015, and has been used in production by many companies. Searchkit is built on top of Elasticsearch within a simple API.
### Any Questions? H... | 4,641 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/autocomplete.jsx | import { autocomplete, getAlgoliaResults, getAlgoliaFacets } from '@algolia/autocomplete-js'
import React, { createElement, Fragment, useEffect, useRef, useState } from 'react'
// eslint-disable-next-line react/no-deprecated
import { render } from 'react-dom'
import client from '@searchkit/instantsearch-client'
import ... | 4,642 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/camping-sites-demo.jsx | import { InstantSearch, SearchBox, Hits, Highlight, createConnector, DynamicWidgets, RefinementList, ToggleRefinement, Panel, Pagination, Stats, connectSearchBox, NumericMenu, RangeInput, CurrentRefinements, QueryRuleCustomData, Snippet, SortBy, Configure, HierarchicalMenu } from 'react-instantsearch-dom';
import Clien... | 4,643 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/demo-ecommerce.tsx | import {
InstantSearch,
SearchBox,
Hits,
Highlight,
DynamicWidgets,
RefinementList,
Pagination,
Stats,
RangeInput,
CurrentRefinements,
Snippet,
SortBy,
InstantSearchServerState,
InstantSearchSSRProvider,
HierarchicalMenu,
ToggleRefinement,
getServerState
} from 'react-instantsearch'
im... | 4,644 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/demo.tsx | import {
InstantSearch,
SearchBox,
Hits,
Highlight,
DynamicWidgets,
RefinementList,
Pagination,
Stats,
RangeInput,
CurrentRefinements,
Snippet,
SortBy,
InstantSearchServerState,
InstantSearchSSRProvider,
useHits,
HitsProps
} from 'react-instantsearch'
import { getServerState } from 'reac... | 4,645 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/demos.mdx | ## Live Demos
Here are some live demos, that show Searchkit used for different use cases.
| Name | Code | Description |
| --- | --- | --- |
| [IMDB Movies](/demo) | [Code](https://github.com/searchkit/searchkit/tree/main/apps/web/pages/demo.tsx) | 5000 Popular IMDB movies |
| [Semantic Search Example](https://codesa... | 4,646 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/geo-search-demo.jsx | import { InstantSearch, Hits, RefinementList } from 'react-instantsearch-dom';
import Client from '@searchkit/instantsearch-client'
import Searchkit from "searchkit"
import Head from "next/head"
import {
GoogleMapsLoader,
GeoSearch,
Marker,
} from 'react-instantsearch-dom-maps';
const searchkitClient = new Sea... | 4,647 |
0 | petrpan-code/searchkit/searchkit/apps/web | petrpan-code/searchkit/searchkit/apps/web/pages/index.mdx | ---
title: Elasticsearch Site Search UI Components
keywords: Vue, React, Angular, Instantsearch, Elasticsearch, Searchkit, Search UI Components, Search UI, Searchkit UI, Searchkit UI Components, Searchkit Components, Searchkit Instantsearch, Searchkit Instantsearch Components, Searchkit Instantsearch UI, Searchkit Inst... | 4,648 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages | petrpan-code/searchkit/searchkit/apps/web/pages/api/config.ts | import { SearchkitConfig } from '@searchkit/api'
export const config: SearchkitConfig = {
connection: {
host: 'https://commerce-demo.es.us-east4.gcp.elastic-cloud.com:9243',
apiKey: 'a2Rha1VJTUJMcGU4ajA3Tm9fZ0Y6MjAzX2pLbURTXy1hNm9SUGZGRlhJdw=='
},
search_settings: {
highlight_attributes: ['title'],
... | 4,649 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages | petrpan-code/searchkit/searchkit/apps/web/pages/api/product-search.ts | import Client from '@searchkit/api'
import { NextApiRequest, NextApiResponse } from 'next'
const apiClient = Client(
{
connection: {
host: 'https://commerce-demo.es.us-east4.gcp.elastic-cloud.com:9243',
apiKey: 'eGV0UTk0UUJfaGpmdGNGZzk3U286MVNkRFZRbWpTcG1tQTdRX2g0MVpPZw=='
},
search_settings:... | 4,650 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages | petrpan-code/searchkit/searchkit/apps/web/pages/api/search.ts | import Client from '@searchkit/api'
import { NextApiRequest, NextApiResponse } from 'next'
const client = Client(
{
connection: {
host: 'https://commerce-demo.es.us-east4.gcp.elastic-cloud.com:9243',
apiKey: 'a2Rha1VJTUJMcGU4ajA3Tm9fZ0Y6MjAzX2pLbURTXy1hNm9SUGZGRlhJdw=='
},
search_settings: {
... | 4,651 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages | petrpan-code/searchkit/searchkit/apps/web/pages/docs/_meta.json | {
"overview": "Overview",
"getting-started": {
"title": "Quick Start"
},
"components": {
"title": "Components"
},
"proxy-elasticsearch": {
"title": "Proxy Elasticsearch"
},
"query-rules": "Query Rules",
"api-documentation": {
"title": "API Documentation"
},
"tutorials": {
"titl... | 4,652 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages | petrpan-code/searchkit/searchkit/apps/web/pages/docs/overview.mdx | # What is Searchkit?
Elasticsearch is a search engine that enables fast and accurate searching of large volumes of data, but it can take a lot of time and code to build a great search experience.
Searchkit simplifies this process by providing a layer of abstraction on top of Elasticsearch. With Searchkit, you can us... | 4,653 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages | petrpan-code/searchkit/searchkit/apps/web/pages/docs/query-rules.mdx | ---
title: Query Rules
description: Query rules are a powerful feature that allows you to customize the behavior of the search experience.
---
# Query Rules
Query rules are a powerful feature that allows you to customize the behavior of the search experience. They are a set of conditions and consequent actions that a... | 4,654 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/api-documentation/_meta.json | {
"searchkit": "Searchkit API",
"api": "Node API",
"instantsearch-client": "Instantsearch Client API"
}
| 4,655 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/api-documentation/api.mdx | ---
title: Node API
description: Searchkit Node API for Elasticsearch
keywords: ["searchkit", "tutorial", "walkthrough", "elasticsearch", "react", "javascript", "typescript", "search", "search ui", "search experience", "site search", "app search"]
---
import { Tabs, Tab } from '../../../components/Tabs'
### Installati... | 4,656 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/api-documentation/instantsearch-client.mdx | ---
title: Browser Client
description: Instanstsearch client for React Instantsearch
---
import { Tabs, Tab } from '../../../components/Tabs'
### Installation
It is available as `@searchkit/instantsearch-client` on npm.
<Tabs items={['npm', 'yarn', 'CDN']} storageKey="cloud-package-manager">
<Tab>
```sh
npm install ... | 4,657 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/api-documentation/searchkit.mdx | ---
title: Searchkit API
description: Searchkit Node API for Elasticsearch
---
import { Tabs, Tab } from '../../../components/Tabs'
### Installation
It is available as `searchkit` on npm.
<Tabs items={['npm', 'yarn', 'CDN']} storageKey="cloud-package-manager">
<Tab>
```sh
npm install searchkit
```
</Tab>
<Tab>
```sh... | 4,658 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/_meta.json | {
"search-box": "Search Box",
"autocomplete": "Autocomplete",
"results": "Results",
"refinements": "Refinement Facets",
"query-rules": "Query Rules",
"geo-search": "Geo Search",
"sort-by": "Sort By",
"pagination": "Pagination"
} | 4,659 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/autocomplete.mdx | ---
title: Autocomplete
description: How to use Algolia autocomplete.js with Searchkit
---
# Autocomplete
Algolia provides a great autocomplete library called [autocomplete.js](https://github.com/algolia/autocomplete) which can be used with Searchkit. This guide will show you how to use it.
A working example can be ... | 4,660 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/pagination.mdx | ---
title: "Pagination"
---
# Pagination
The `Pagination` component displays a list of links to the different pages of the results.
## Documentation
- [JS Widgets](https://www.algolia.com/doc/api-reference/widgets/pagination/js/)
- [React InstantSearch](https://www.algolia.com/doc/api-reference/widgets/pagination/r... | 4,661 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/search-box.mdx | ---
title: "Search Box"
---
# Search Box
The search box widget is used to let the user perform a text-based query.
## Searchkit Setup
Configure the `search_attributes` to include the fields you want to search on.
he search attributes define what Elasticsearch fields should be searched when a user performs a search... | 4,662 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/sort-by.mdx | ---
title: "Sort By"
---
# Sort By
The sort by widget allows a user to change the way hits are sorted. By default, hits are sorted by descending order of the `_score` (relevance) but a user can change this at any time. You can choose to display the selected sort option in the widget.
## Searchkit Setup
Configure `s... | 4,663 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/geo-search/geo-search.mdx | ---
title: "Geo Search"
---
# Geo Search
This guide will walk you through the process of creating a map based search experience.
## Index Geo Data
In order to create a map based search experience, you will need to index geo data. You must use the `geo_point` type field to index geo data.
See the [Geo Point Data ... | 4,664 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/query-rules/query-rule-context.mdx | ---
title: "Query Rule Context"
---
# Query Rule Context
The Query Rule Context widget allows you to apply rule contexts to the search parameters. This is useful if you want to apply a set of rules to a specific set of users.
## Query Rules Documentation
## Documentation
- [JS Widgets](https://www.algolia.com/do... | 4,665 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/query-rules/query-rule-custom-data.mdx | ---
title: "Query Rule Custom Data"
---
# Query Rule Custom Data
The QueryRuleCustomData widget displays custom data from Rule Actions.
You may want to use this widget to display banners, do redirects or recommendations returned by Rule actions.
## Documentation
- [JS Widgets](https://www.algolia.com/doc/api-refer... | 4,666 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/_meta.json | {
"refinement-list": "Refinement List",
"hierarchical-menu": "Hierarchical Menu",
"numeric-menu": "Numeric Menu",
"range-slider": "Range Slider",
"range-input": "Range Input",
"rating-menu": "Rating Menu",
"menu": "Menu",
"menu-select": "Menu Select",
"toggle-refinement": "Toggle Refinement",
"curre... | 4,667 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/add-custom-refinement.mdx | ---
title: "Add Custom Refinement"
---
## Example: Adding a custom Filter Input Search Box
Add a new filter attribute to `search_settings`.
When a `writers` filter is applied, will add a match filter clause to the query.
```tsx
{
search_settings: {
filter_attributes: [
{
attribute: 'writers',
... | 4,668 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/clear-refinements.mdx | ---
title: "Clear Refinements"
---
# Clear Refinements
Clears all the refinements currently applied and triggers a search.
## Documentation
- [JS Widgets](https://www.algolia.com/doc/api-reference/widgets/clear-refinements/js/)
- [React Instantsearch](https://www.algolia.com/doc/api-reference/widgets/clear-refineme... | 4,669 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/current-refinements.mdx | ---
title: "Current Refinements"
---
# Current Refinements
Current Refinements is a widget that displays the currently applied filters. It is typically displayed on the top of a search interface.
## Documentation
- [JS Widgets](https://www.algolia.com/doc/api-reference/widgets/current-refinements/js/)
- [React Inst... | 4,670 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/dynamic-widgets.mdx | ---
title: "Dynamic Widgets"
---
# Dynamic Widgets
Dynamic widgets are widgets that are added or removed from the UI based on query rules actions. They are useful when you want to display a widget only when a certain query or filter has been applied.
With the `DynamicWidgets` widget, you can order and conditionally ... | 4,671 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/hierarchical-menu.mdx | ---
title: "Hierarchical Menu"
---
# Hierarchical Menu
Hierarchical Menu is a widget that displays a hierarchical menu. It is commonly used for categories with subcategories.
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Apple",
"product": "Macbook Pro 14",
"category_lvl1": "E... | 4,672 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/menu-select.mdx | ---
title: "Menu Select"
---
# Menu Select
Menu Select is a widget that displays a list of values inside a select dropdown menu.
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Apple",
"product": "Macbook Pro 14",
"category": "Electronics"
}
```
alternatively could be indexed a... | 4,673 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/menu.mdx | ---
title: "Menu"
---
# Menu Select
Menu Select is a widget that displays a list of values for a single facet. Operates similar to a refinement list, but with a single selection at a time.
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Apple",
"product": "Macbook Pro 14",
"cate... | 4,674 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/numeric-menu.mdx | ---
title: "Numeric Menu"
---
# Numeric Menu
Numeric Menu is a widget that displays a list of numeric filters in a list. The filter options are part of the configuration and enabled / disabled based on the current search results.
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Apple... | 4,675 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/range-input.mdx | ---
title: "Range Input"
---
# Range Input
Range Input is a widget that displays inputs for filtering on a numeric range. It will use aggregation stats to determine the min and max values of the attribute and display the range input accordingly.
## Setup
The following document indexed in Elasticsearch:
```json
{
... | 4,676 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/range-slider.mdx | ---
title: "Range Slider"
---
# Range Slider
Range slider is a widget that allows the user to refine the range of a numeric attribute. It is a slider with two handles that can be moved to adjust the range. It calculates the min and max values of the attribute using the stats aggregation.
## Setup
The following docu... | 4,677 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/rating-menu.mdx | ---
title: "Rating Menu"
---
# Rating Menu
The rating menu widget displays a list of ratings. When a user clicks on a rating, the widget will trigger a new search with the corresponding rating filter.
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Apple",
"product": "Macbook Pro ... | 4,678 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/refinement-list.mdx | ---
title: "Refinement List"
---
# Refinement List
Refinement List is a widget that displays a list of values for a specific attribute. It is commonly used to display a list of categories or filters.
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Apple",
"product": "Macbook Pro 1... | 4,679 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/refinements/toggle-refinement.mdx | ---
title: "Toggle Refinement"
---
# Toggle Refinement
Toggle refinement is a widget that allows you to specify a filter that you can toggle on and off. It is commonly used for boolean values such as "free shipping" or "in stock".
## Setup
The following document indexed in Elasticsearch:
```json
{
"brand": "Appl... | 4,680 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/results/_meta.json | {
"hits": "Hits",
"infinite-hits": "Infinite Hits",
"highlight": "Highlight",
"snippet": "Snippet"
} | 4,681 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/results/highlight.mdx | ---
title: "Highlight"
---
# Highlight
Highlight is a widget that displays highlighted attributes from a hit. It is commonly used to display the search query within the results.
## Differences between highlighting and snippets
Highlighting and snippets are very similar. The main difference is that highlighting is r... | 4,682 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/results/hits.mdx | ---
title: "Hits"
---
# Hits
The `Hits` component displays a list of results from the current search.
## Searchkit Setup
Within `result_attributes` in `search_settings`:
```ts
{
search_settings: {
result_attributes: ['title', 'description', 'image', 'price', 'url']
}
}
```
## Usage
Below is an example of... | 4,683 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/results/infinite-hits.mdx | ---
title: "Infinite Hits"
---
# Infinite Hits
The `Hits` component displays a list of results from the current search.
## Searchkit Setup
Within `result_attributes` in `search_settings`:
```ts
{
search_settings: {
result_attributes: ['title', 'description', 'image', 'price', 'url']
}
}
```
## Usage
Belo... | 4,684 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components | petrpan-code/searchkit/searchkit/apps/web/pages/docs/components/results/snippet.mdx | ---
title: "Snippet"
---
# Snippet
Snippet is a widget that displays highlighted attributes from a hit. It is commonly used to display snippets of an attribute where the search query has matched.
## Differences between highlighting and snippets
Highlighting and snippets are very similar. The main difference is that... | 4,685 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/getting-started/_meta.json | {
"with-javascript": {
"title": "With JS Widgets"
},
"with-react": {
"title": "With React"
},
"with-vue": {
"title": "With Vue"
},
"with-angular": {
"title": "With Angular"
},
"setup": {
"display": "hidden"
}
}
| 4,686 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/getting-started/setup.mdx | ---
title: Quick Start with Searchkit
---
import { Callout, Tabs, Tab } from 'nextra-theme-docs'
## Quick Start
For this quick start, we are going to run Elasticsearch locally and build a small e-commerce search experience using Searchkit and instantsearch.
### Running Elasticsearch
<Callout type="info">
This qu... | 4,687 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/getting-started/with-angular.mdx | ---
title: "With Angular"
---
TODO - contributions welcome! | 4,688 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/getting-started/with-javascript.mdx | ---
title: Quick Start with Searchkit
description: This guide will show you how to get started with Searchkit and instantsearch.js.
keywords: searchkit, instantsearch, search, javascript, jquery
---
import { Callout, Tabs, Tab } from 'nextra-theme-docs'
import Setup from './setup.mdx'
## Quick Start with Searchkit an... | 4,689 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/getting-started/with-react.mdx | ---
title: With React
description: Tutorial for getting started with Searchkit and React Instantsearch
keywords: searchkit, react, instantsearch, tutorial, quickstart, getting started, Elasticsearch, Opensearch
---
import { Callout, Tabs, Tab } from 'nextra-theme-docs'
import Setup from "./setup.mdx"
## Quick Start w... | 4,690 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/getting-started/with-vue.mdx | ---
title: "With Vue"
description: "How to build Search UI with Vue and Elasticsearch Quick Start"
keywords: "vue, elasticsearch, search, search ui, searchkit, searchkit quick start"
---
# With Vue
## Download an Example Project
You can check out a vite + vue instantsearch project with Searchkit here:
```bash
curl ... | 4,691 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/_meta.json | {
"setup-elasticsearch": "Setup Elasticsearch",
"enable-cors": "Enable CORS",
"indexing-data": "Indexing Data",
"customising-query": "Search Relevance",
"facets": "Facets",
"filters": "Filters",
"user-restricted-data": "User-restricted access to data",
"learn-to-rank": "Learn to Rank",
"migrating-algo... | 4,692 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/customising-query.mdx | ---
title: Search Relevance
description: How to customise the default query for customised relevance
---
Out the box, Searchkit provides a Elasticsearch query that is designed to work well for most use cases. However, you may want to customise the query to improve the relevance of the search results.
This example sho... | 4,693 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/enable-cors.mdx | ---
title: Add CORS headers
description: Add CORS headers to Elasticsearch / Opensearch to allow calling directly from the browser
---
import { Callout } from 'nextra-theme-docs'
# Add CORS headers
<Callout type="info">
This is only required if you're calling Elasticsearch directly from the browser and without pro... | 4,694 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/filters.mdx | ---
title: Filters
description: Learn how to apply filters to your search results.
---
# Filters
import { Tabs, Tab } from '../../../components/Tabs';
There are a number of ways to apply filters to your search results. Filters can be applied on:
- [client](#applying-filters-on-the-client) - Highlighting results on t... | 4,695 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/indexing-data.mdx | ---
title: Indexing data
description: Indexing data into Elasticsearch for use with Instantsearch and Searchkit
---
## Setting up an Index
We are going to issue commands via Kibana's dev tools console. You can alternatively use a REST client like Postman or curl to achieve this.
First we need to create an index for ... | 4,696 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/learn-to-rank.mdx | ---
title: Learn to Rank
description: Integrate Learn to Rank with Metarank
---
# Learn to Rank
Learn to Rank is a machine learning technique that allows you to train a model to rank search results. The model is trained using a set of features and a set of relevance judgements. The model is then used to rank search r... | 4,697 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/migrating-algolia-to-elasticsearch.mdx | ---
title: Migrating from Algolia to Elasticsearch with Searchkit
description: Use Searchkit to migrate from Algolia to Elasticsearch
---
## Migrating from Algolia to Elasticsearch with Searchkit
One of the most common questions we get asked is how to migrate from Algolia to Elasticsearch. With Searchkit v4 and Insta... | 4,698 |
0 | petrpan-code/searchkit/searchkit/apps/web/pages/docs | petrpan-code/searchkit/searchkit/apps/web/pages/docs/guides/setup-elasticsearch.mdx | ---
title: Connecting to Elasticsearch
description: How to connect to Elasticsearch with Searchkit
---
import { Callout } from "nextra-theme-docs";
# Setup & Connect to Elasticsearch
The easiest way to connect to Elasticsearch is to use Elastic cloud. You can sign up for a free trial account and get started right aw... | 4,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.