GithubHelp home page GithubHelp logo

isabella232 / app-search-reference-ui-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elastic/app-search-reference-ui-react

0.0 0.0 0.0 1.8 MB

A generic UI for use with any App Search Engine

Home Page: https://www.elastic.co/products/app-search

License: Apache License 2.0

HTML 6.87% JavaScript 90.18% Shell 2.94%

app-search-reference-ui-react's Introduction

Elastic App Search Logo

A configurable, generic search UI for any Elastic App Search Engine.

Contents


Getting started ๐Ÿฃ

The Reference UI is great for:

  • search demos
  • functional tests of App Search Engine data
  • a starting point for new search experiences

Requires npm.

The README assumes that you have generated this code from within the App Search dashboard.

Run the following commands to start this application:

# Run the `cd` command to change the current directory to the
# location of your downloaded Reference UI. Replace the path
# below with the actual path of your project.
cd ~/Downloads/app-search-reference-ui

# Run this to set everything up
npm install

# Run this to start your application and open it up in a new browser window
npm start

Usage

Updating configuration

The project can be configured via a JSON config file.

You can easily control things like...

  • The Engine the UI runs against
  • Which fields are displayed
  • The filters that are used

If you would like to make configuration changes, there is no need to regenerate this app from your App Search Dashboard!

You can simply open up the engine.json file, update the options, and then restart this app.

Configuration options

The following is a complete list of options available for configuration in engine.json.

option value type required/optional source
engineName String required Found in your App Search Dashboard.
endpointBase String required* (*) Elastic Enterprise Search deployment URL, example: "http://127.0.0.1:3002". Not required if using App Search on swiftype.com.
hostIdentifier String required* (*) Only required if using App Search on swiftype.com.
searchKey String required Found in your App Search Dashboard.
searchFields Array[String] required A list of fields that will be searched with your search term.
resultFields Array[String] required A list of fields that will be displayed within your results.
querySuggestFields Array[String] optional A list of fields that will be searched and displayed as query suggestions.
titleField String optional The field to display as the title in results.
urlField String optional A field with a url to use as a link in results.
sortFields Array[String] optional A list of fields that will be used for sort options.
facets Array[String] optional A list of fields that will be available as "facet" filters. Read more about facets within the App Search documentation.

External configuration

If you are embedding this app inside of another page, and you would like to source the configuration from outside of the engine.json file, you can simply write the configuration directly to window.appConfig.

If you are checking this project out directly from GitHub...

You can follow the previous steps, but then you will need to configure engine.json.

To do so, make a copy of engine.json.example, rename it to engine.json and configure it with your Engine's specific details.

cp src/config/engine.json.example src/config/engine.json

Deploy and Share

This app can be easily published to any server as static assets and served. We recommend Netlify, but you have other options as well.

To deploy:

npm run build
npm install netlify-cli -g
netlify deploy # enter ./build as the deploy path

You'll then simply follow the command prompt to log into Netlify and deploy your site. This can be completed in just a few minutes.

Customization

This project is built with Search UI, which is a React library for building search experiences. If you're interested in using this project as a base for your own, most of what you'll need can be found in the Search UI documentation.

FAQ ๐Ÿ”ฎ

Where do I report issues with the Reference UI?

If something is not working as expected, please open an issue.

Where can I learn more about App Search?

Your best bet is to read the documentation.

Where else can I go to get help?

You can checkout the Elastic App Search community discuss forums.

Contribute ๐Ÿš€

We welcome contributors to the project. Before you begin, a couple notes...

License ๐Ÿ“—

Apache-2.0 ยฉ Elastic

Thank you to all the contributors!

app-search-reference-ui-react's People

Contributors

cee-chen avatar dependabot[bot] avatar goodroot avatar jasonstoltz avatar jgr avatar orhantoy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.