- Mirage: Intro
- Features
- Roadmap
- Build Locally
- How to contribute
- Get Mirage
a. Hosted
b. Chrome Extension
c. Appbase.io
d. Run with Docker
e. Elasticsearch Plugin (deprecated)
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.
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.
- 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.
- Mirage provides two ways to add compound query clauses,
Add Conditions
allows adding additional clauses within the same query andNested Query
allows adding a nested query clause.
- Queries can be saved for later reuse. They can also be captured and shared by copying the URL.
- See docs for any query from within the app.
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.
$ npm install
$ bower install
$ npm start
This will start a local webserver running on port 3030 serving mirage locally.
$ npm test
will fire up the jasmine tests.
$ npm run build_es_plugin
$ npm run build_chrome_extension
- Find a query that can be supported from the roadmap.
- Fork the mirage repo and update in "dev" branch.
- Create the query files.
- Build locally and run
npm test
. - Submit a PR!
Mirage is available as a hosted app and as a chrome extension.
or
Note:
We're working on bringing this back.
or
Every app in appbase.io has a query explorer view, which uses mirage.
or
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
[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.