Skip to content

Instantly share code, notes, and snippets.

@JasonStoltz
JasonStoltz / App.js
Created June 27, 2019 20:36
Medium - Search UI - 10
const configurationOptions = {
// ...
autocompleteQuery: {
suggestions: {
types: {
documents: {
// Which fields to search for suggestions.
fields: ["name"]
},
// How many suggestions appear.
@JasonStoltz
JasonStoltz / App.js
Created June 27, 2019 20:37
Medium - Search UI - 11
// ...
<Layout
// ...
header={<SearchBox autocompleteSuggestions={true} />}
/>
// ...
@JasonStoltz
JasonStoltz / app-search-cli
Last active April 27, 2022 13:25
App Search CLI
#!/usr/bin/env node
/**
* Install:
*
* Download this file and give it executuable persmissions
*
* Usage:
*
* Uploading documents
import React, { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import styled, { withTheme } from 'styled-components'
import { withSearch } from '@elastic/react-search-ui'
import _get from 'lodash/get'
import Slider from 'rc-slider'
import 'rc-slider/assets/index.css'
import { FacetContainer, FacetHeader } from './SearchFacet'