Skip to content
🎨 GUI for simplifying Elasticsearch Query DSL
TypeScript HTML CSS JavaScript Dockerfile
Branch: dev
Clone or download

Latest commit

Latest commit 81f2b2f Oct 11, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app fix: v7 cluster mapping Aug 5, 2019
assets fix: default connection string + query + button position Mar 26, 2019
.bowerrc Add bowerrc Oct 11, 2016
.codeclimate.yml Add codeclimate related files Oct 3, 2016
.dockerignore optimize docker build size Feb 18, 2019
.gitignore Add version support for elasticsearch Sep 20, 2016
Dockerfile chore: update node version in Dockerfile Jul 17, 2019
HOW-TO-CONTRIBUTE.md Update and rename addNewQuery.md to HOW-TO-CONTRIBUTE.md Oct 3, 2016
LICENSE.md bumps version and adds license file Sep 29, 2016
README.md Update README.md Oct 11, 2019
bower.json fix: editor indentation Mar 26, 2019
bs-config.json Fix jquery layout issue Aug 9, 2016
gulpfile.js upgrade appbase-js and remove unnecessary auth headers #55 Jan 25, 2018
index.html use minified vendor Jan 25, 2018
index_prod.html Use Doctype in html file Mar 20, 2017
mirage.appcache build v0.7.1 Jan 25, 2018
mirageSample.appcache Use Doctype in html file Mar 20, 2017
package.json doc: update version compatibility info Jul 17, 2019
systemjs.config.js Changes Aug 4, 2016
tsconfig.json Create stand alone build with gulp Aug 4, 2016
tslint.js Add codeclimate related files Oct 3, 2016
typings.json Add the build flow using gulp Aug 7, 2016
unit-tests.html Add span_first query support Nov 9, 2016
yarn.lock fix: deps Jul 3, 2019

README.md

Docker Pulls

Mirage: 🔎 GUI for Elasticsearch Queries

  1. Mirage: Intro
  2. Features
  3. Roadmap
  4. Build Locally
  5. How to contribute
  6. Get Mirage
    a. Hosted
    b. Chrome Extension
    c. Appbase.io
    d. Run with Docker
    e. Elasticsearch Plugin (deprecated)

1. Mirage: Intro

The Elasticsearch query DSL supports 100+ query APIs ranging from full-text search, numeric range filters, geolocation queries to nested and span queries.

Mirage is a modern, open-source web based query explorer for Elasticsearch.

2-min Intro to Mirage

It offers a blocks based GUI for composing Elasticsearch queries and comes with an on-the-fly transformer to show the corresponding JSON query API of Elasticsearch.


2. Features

  • Mirage's GUI building blocks offer a smart way to creating queries. It uses the index's Elasticsearch mappings and the selected field's datatype to show only the applicable queries in the dropdown.

Watch Queries being built in realtime


  • Mirage provides two ways to add compound query clauses,
    • Add Conditions allows adding additional clauses within the same query and
    • Nested Query allows adding a nested query clause.

Intuitively layer complexity to your queries


  • Queries can be saved for later reuse. They can also be captured and shared by copying the URL.

Save queries for later reuse

  • See docs for any query from within the app.

Browse docs from within Mirage


3. Roadmap

Mirage works with any Elasticsearch 2.x, 5.x, 6.x and 7.x index currently. Below is the roadmap for query support.

✓ indicates queries already supported.
indicates queries we would like to support and see contributions for.
indicates queries that can't be supported currently.

Full-text Queries Term Level Queries Joining Queries Geo Queries Specialized Queries Span Queries
✓ Match ✓ Term ✓ Nested ✓ GeoDistance MoreLikeThis ✓ SpanTerm
✓ Multi-match ✓ Terms ✓ HasChild ✓ GeoBoundingBox Template SpanMulti
✓ Query String ✓ Range ✓ HasParent ✓ GeoShape Script ✓ SpanFirst
✓ Simple Query String ✓ Exists ✓ ParentId ✓ GeoDistanceRange SpanNear
✓ Common Terms ✓ Missing ✓ GeoPolygon SpanOr
✓ Prefix ✓ GeoHashCell SpanNot
✓ Wildcard SpanContaining
✓ Regexp SpanWithin
✓ Fuzzy
✓ Ids
Type

Besides broadening the query support, we would like to see Mirage support Elasticsearch v5.0.


4. Build Locally

$ npm install
$ bower install
$ npm start

This will start a local webserver running on port 3030 serving mirage locally.

Tests

$ npm test

will fire up the jasmine tests.

master branch: Elasticsearch Plugin

$ npm run build_es_plugin

chrome-extension branch: Chrome extension

$ npm run build_chrome_extension

5. How to Contribute

  1. Find a query that can be supported from the roadmap.
  2. Fork the mirage repo and update in "dev" branch.
  3. Create the query files.
  4. Build locally and run npm test.
  5. Submit a PR!

6. Get Mirage

Mirage is available as a hosted app and as a chrome extension.

Use hosted app

or

Get the Chrome extension

Note: We're working on bringing this back.

or

appbase.io dashboard

Every app in appbase.io has a query explorer view, which uses mirage.

Mirage Gif

or

Run with docker

Works with Elasticsearch versions 1.x, 2.x, 5.x, 6.x and 7.x.

docker run -p 3030:3030 -d appbaseio/mirage

CORS settings: To make sure you enable CORS settings for your ElasticSearch instance, add the following lines in the ES configuration file.

http.port: 9200
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization
http.cors.allow-credentials: true

Install as Elasticsearch Plugin

[Deprecated] Works with Elasticsearch versions 1.x and 2.x. Site plugins have been disabled starting v5.0. We recommend running mirage with docker instead.

plugin install appbaseio/mirage

Note: Elasticsearch has a CORS header issue with v2.3.0, use v2.3.2 and above.

http.port: 9200
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization
http.cors.allow-credentials: true

After installing the plugin, start the elasticsearch service and visit the following URL to access it.

http://127.0.0.1:9200/_plugin/mirage

Note: If you use Elasticsearch from a different port, the URL to access and the http.cors.allow-origin value in the configuration file would change accordingly.

Mirage can be used along with ⊞ DejaVu to browse data and perform CRUD operations inside an Elasticsearch index.


Proudly built with

You can’t perform that action at this time.