Go to file
Lukas Olson 0f00c23a68
Kibana query language autocomplete (#15945)
* First stab at refactoring typeahead

* Don't double submit on enter

* Add item templating

* Introduce simple kuery language

* Rename to kql and add modules

* Update KQL syntax

* Automatically insert matching pairs

* Don't match quotes after alphanumeric chars

* Get field and value suggestions

* Remove accidental changes

* Remove unnecessary test

* Don't submit on enter

* Fix typeahead

* Suggest matching recent searches

* Suggest operators

* Suggest conjunctions

* Use template, separate suggestions into separate modules

* Whoops, add this module back

* Add clarifying comment

* Fix history log key

* Don't update suggestions on every key press

* Fix key handling

* Update terminology to be clearer

* Fix typo

* Simplify building of nodes

* Don't always hide on submit

* Check items exists

* Add icon directive which wraps EuiIcon.

* kql design start

* remove comment bits

* Simplify select next/prev and reset selected on hide/backspace

* Add test

* Put persistedLog on scope so it can be tested

* Fix typos

* Build up AST for sublist by returning functions that take a field name

* Remove single quoted strings and add double quote to special characters

* Build nodes with arg nodes instead of args themselves

* Add support for exact phrase search for quoted values

* Update typeahead items when language changes

* Finish that work I didn't do in the last commit

* This commit makes Bargs very happy cuz it does a lot

* Add wildcard field support to range query

* Remove range support for wildcard values

* Remove KQL as a separate language

Updates kuery to use KQL's grammar. This will lead to a smoother
transition for both us and Kuery users. We mainly added KQL as a
separate language so that we could notify Kuery users that the syntax
had changed. I realized we could do the same by trying to parse their
query strings with the old grammar if the new grammar fails, and if the
old grammar parses successfully we can display an error message with a
link to the docs describing the syntax changes. Since Kuery now uses the
more simple KQL syntax, I've also re-enabled the filter bar when Kuery
is selected.

* Fix typeahead behavior

* Update conjunctions

* Use scope apply

* Suggest conjunctions after ranges

* Support strings in wildcard node constructor and add tests for wildcard node

* test updates

* Removing unused serializeStyle and toKueryExpression, updating tests

* Fix functional test

* Fix typo

* Show fields that match in any part of the name

* Alter order of operators

* Preserve focus after selecting by click

* Ports tests for `fromKueryExpression` to `fromKqlExpression`

* More KQL syntax tests

* Suggest conjunctions after ranges

* Fix suggestions inside parens

* fromLiteralExpression tests

* remove serializeStyle arguments which no longer exist in the function definition

* tests for getFields

* Case insensitive search for field names

* update tests for is.js

* add wildcard fieldname test for range.js

* Fix removed div

* Fix line spacing for autocomplete suggestions

* Fix conjunction suggestions with escaped preceding literals

* Escape special characters in fields and values

* Don't suggest the value that's already selected

* Update icons

* Sort prefix first

* Simplify cursor detection and suggest booleans

* Use quotes for suggested values

* get rid of references to KQL

* Don't show errors from parsing

* That didn't even exist

* Use config to determine if values are suggested

* Update suggestions on home/end

* remove hack

* Update reference to kql

* Suggestions for quoted values

* Clean up grammar

* Better support for cursor inside spaces

* Create grunt task to generate parsers from peg files

* Simplify wildcard handling

* Don't filter out the exact fields/values

* Update parsing modules

* Fix peg task

* Make operator syntax more visible

* Update OR verbiage

* Simplify and improve match pairs

* Revert "Simplify wildcard handling"

This reverts commit 915861beab.

* Support escaped backslashes inside quoted strings

* Support escaped keywords

* Remove lodash dependency cuz w33ble

* Escape user input and fix conjunction description

* Clear suggestions after submitting

* Fix insertion of suggestion to account for selection

* Remove unnecessary?

* Remove extraneous file

* Better name for method

* Move functions out of event handler

* Don't wrap result in promise

* Don't show kuery suggestions for lucene

* some cleanup and polish for kql autocomplete

* Omit description completely for values

* Don't suggest and/or for quoted strings that end in spaces

* Submit recent search suggestions on select

* Scroll selected suggestion into view

* Better handling of key events and hiding typeahead

* Update suggestions to work in other apps with multiple index patterns

* Only update suggestions if not submitting

* Hide suggestions on focus

* Simplify wildcard (again)

* Fix console error

* Remove references to kql

* Fix match pairs so that suggestions occur with cursor in correct place

* Memoize value suggestions

* Debounce model updates

* Add tests for suggestion providers

* Add setting and docs

* Add custom error, helper for detecting leading wildcards, and check for
leading wildcards in the Value rule of the grammar.

* Better handling of suggestion clicks

* Dedup suggestions

* Sort keywords first

* Fix value suggestions memoizing

* Check if query exists

* Reduce size of dialog and fix ranges

* Create grunt task to generate parsers from peg files

* Lazy load typeahead items

* Fix wildcard tests

* Fix value suggestion tests

* Fix typeahead tests

* Fix value suggestion memoize resolver

* Leave comment

* Add a ttl for the value suggestion resolver

* Move grunt config to config/

* Bargs can suck it

* Fix more tests that bargs broke (and one I did too)

* Fix tests
2018-03-22 08:51:35 -07:00
.github Switch to Yarn (#15485) 2018-01-10 13:23:43 +01:00
bin Remove node fallback from kibana-keystore (#15066) 2017-11-27 10:11:38 -06:00
config [server/rewriteBasePath] Support rewriting basePath requests (#16724) 2018-02-19 12:36:19 -07:00
data [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
docs Kibana query language autocomplete (#15945) 2018-03-22 08:51:35 -07:00
packages Kibana query language autocomplete (#15945) 2018-03-22 08:51:35 -07:00
plugins [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
scripts [kbn-es] Package for managing Elasticsearch during dev and testing (#17168) 2018-03-20 08:30:15 -07:00
src Kibana query language autocomplete (#15945) 2018-03-22 08:51:35 -07:00
style_guides [@kbn/ui-framework] move ui-framework to a package (#17085) 2018-03-13 10:43:39 -07:00
tasks Create grunt task to generate parsers from peg files (#17069) 2018-03-21 16:42:23 -07:00
test Don't use transforms (#17175) 2018-03-21 14:27:07 -04:00
ui_framework/doc_site/build moving plugin template to React and EUI (#16937) 2018-03-19 15:13:03 -04:00
utilities Upgrade to eslint 4 (#14862) 2017-11-14 18:16:59 -07:00
webpackShims Prettier + ESLint setup (#16514) 2018-02-05 18:18:43 +01:00
.backportrc.json Adds 6.2 branch to backport config (#16165) 2018-01-19 11:26:38 -08:00
.editorconfig Apply the same editorconfig rules to both markdown and asciidoc files 2016-09-07 11:41:41 -04:00
.eslintignore [@kbn/ui-framework] move ui-framework to a package (#17085) 2018-03-13 10:43:39 -07:00
.eslintrc.js [kbn-es] Package for managing Elasticsearch during dev and testing (#17168) 2018-03-20 08:30:15 -07:00
.gitignore [kbn-es] Package for managing Elasticsearch during dev and testing (#17168) 2018-03-20 08:30:15 -07:00
.node-version Bumps node to 8.9.4 (#16981) 2018-03-05 16:19:02 -08:00
.nvmrc Add .nvmrc file (#17145) 2018-03-15 14:34:31 +01:00
.prettierrc Prettier + ESLint setup (#16514) 2018-02-05 18:18:43 +01:00
CONTRIBUTING.md [kbn-es] Package for managing Elasticsearch during dev and testing (#17168) 2018-03-20 08:30:15 -07:00
FAQ.md propose language changes (#10709) 2017-03-05 12:10:32 -05:00
Gruntfile.js create babel-preset and babel-register modules (#13973) 2017-09-19 17:44:47 -07:00
LICENSE.md [build] Add notice file (#10344) 2017-02-16 11:41:09 -05:00
package.json Create grunt task to generate parsers from peg files (#17069) 2018-03-21 16:42:23 -07:00
preinstall_check.js Preinstall check that mentions 'yarn kbn' (#16572) 2018-02-08 13:40:57 +01:00
README.md [DOCS] Build Kibana Guide from kibana repo (#16450) 2018-02-01 10:19:00 -08:00
STYLEGUIDE.md Fix typo in accessibility styleguide link (#14718) 2017-11-02 12:28:22 +01:00
tsconfig.json Port kbn-pm to TypeScript. (#16732) 2018-02-21 10:09:30 +01:00
yarn.lock Create grunt task to generate parsers from peg files (#17069) 2018-03-21 16:42:23 -07:00

Kibana 7.0.0-alpha1

Kibana is your window into the Elastic Stack. Specifically, it's an open source (Apache Licensed), browser-based analytics and search dashboard for Elasticsearch.

Getting Started

If you just want to try Kibana out, check out the Elastic Stack Getting Started Page to give it a whirl.

If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the Kibana Getting Started Page.

Using a Kibana Release

If you want to use a Kibana release in production, give it a test run, or just play around:

Building and Running Kibana, and/or Contributing Code

You might want to build Kibana locally to contribute some code, test out the latest features, or try out an open PR:

Snapshot Builds

For the daring, snapshot builds are available. These builds are created nightly and have undergone no formal QA, so they should never be run in production. All builds are 64 bit.

platform
OSX tar
Linux tar deb rpm
Windows zip

Documentation

Visit Elastic.co for the full Kibana documentation.

For information about building the documentation, see the README in elastic/docs.

Version Compatibility with Elasticsearch

Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer major number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning.

Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers.

Situation Example Kibana version Example ES version Outcome
Versions are the same. 5.1.2 5.1.2 💚 OK
ES patch number is newer. 5.1.2 5.1.5 ⚠️ Logged warning
ES minor number is newer. 5.1.2 5.5.0 ⚠️ Logged warning
ES major number is newer. 5.1.2 6.0.0 🚫 Fatal error
ES patch number is older. 5.1.2 5.1.0 ⚠️ Logged warning
ES minor number is older. 5.1.2 5.0.0 🚫 Fatal error
ES major number is older. 5.1.2 4.0.0 🚫 Fatal error

Questions? Problems? Suggestions?

  • If you've found a bug or want to request a feature, please create a GitHub Issue. Please check to make sure someone else hasn't already created an issue for the same topic.
  • Need help using Kibana? Ask away on our Kibana Discuss Forum and a fellow community member or Elastic engineer will be glad to help you out.