Commit graph

25 commits

Author SHA1 Message Date
Matt Bargar aeaf57dd97
Add query enhancements opt-in switch to query bar (#17232)
Makes our language updates more visible to users and removes mentions of Kuery as a separate language. Users still get the old lucene experience by default, but have the option to opt-in to "experimental query features" directly in the query bar. Goal is to get more feedback by making these new features more prominent and less of a jump from lucene.
2018-03-22 15:47:52 -04:00
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
Anshita Vishwakarma 32e6cc3f3b Beta tag removed from Kibana-CCS Integration in master branch (#16847) 2018-02-21 17:26:59 -07:00
Thomas Neirynck 2e02b78a9a
Add enableLabs to docs (#16301) 2018-01-30 11:50:38 -05:00
Lukas Olson e6b65fc4c6
Add advanced setting to control quick ranges (#15975)
* Add advanced setting to control quick ranges

* Fix test

* Add docs for quick ranges

* Remove comment
2018-01-12 14:11:42 -07:00
jerenmb 6dfde4f793 Spelling corrections (#11908) 2017-08-30 10:52:13 -04:00
Matt Bargar 3043ee78c8 Check sort:options for Discover default sort order (#13708)
* Check sort:options for Discover default sort order

I went back and forth on a lot of different solutions for this.

Initially I thought it would make sense to just allow users to set a
default saved search in Discover. There were some problems with that
approach though. It would change the default workflow in Discover.
Instead of starting with an unsaved search, users would be editing a
saved search by default. I could see this leading to a lot of
unintentional changes to the default. The settings from the default
saved search also wouldn't carry over to new searches, which I think
would be desirable most of the time.

I also considered adding a new advanced setting for specifying a default
sort field/direction. This kind of setting would make more sense at the
index pattern level though. One field may not be valid across all index
patterns.

So I ended up going with the simplest solution. It solves the issue
identified by the author of the linked issue and nothing more. If a sort
order is specified in the existing sort:options advanced setting, we'll
use that direction when sorting on the index pattern's timestamp field
by default.

Fixes https://github.com/elastic/kibana/issues/5164

* Create a new advanced setting instead of re-using sort:options

* Just pass a default order
2017-08-29 15:42:36 -04:00
Lukas Olson 19ac99a388 Re-enable filter editor suggestions (#13376)
* Re-enable filter editor suggestions

* Use search instead of include

* Escape query

* Show spinner

* Use include rather than search

* Add additional regex and explanation for parameters

* Add suggestions API test

* Make sure test actually runs

* Use send instead of query

* Fix suggestions API test
2017-08-25 16:38:49 -07:00
Lukas Olson 54622755f8 Remove highlight query (#13231)
* Change use of all_fields in highlight_query to default_field

* Remove highlight query and option

* Fix tests

* Remove unused setting

* Remove lingering references to all_fields
2017-08-07 13:34:11 -07:00
Thomas Neirynck 5fe682dfc2 Improve region map documentation (#13319) 2017-08-03 14:46:16 -04:00
Matt Bargar d379e9a35b Implement new Kibana query language (#12624)
Initial version of an experimental new query language for Kibana.
2017-07-21 11:55:15 -04:00
Court Ewing 748d604fd4 docs: removal of "expand indices" feature in breaking changes (#12830)
* docs: removal of "expand indices" feature in breaking changes

* docs: remove "expand indices" from index pattern

This feature no longer exists.
2017-07-13 09:46:29 -04:00
Lukas Olson 055080521c Make filter editor suggestions opt-in (#12710)
* Add shard_size to the suggestions terms agg request

* Make filter editor suggestions opt-in

* Add size parameter
2017-07-11 10:46:55 -07:00
Court Ewing 580e0d2964 docs: setting up cross cluster search (#12599)
There isn't a whole lot to say about cross cluster search support in
Kibana other than how to set it up, which is by design.
2017-07-05 17:18:55 -04:00
Lisa Cawley e21a133e00 [DOCS] Update Kibana Guide to use shared attributes (#12505)
* [DOCS] Update Kibana Guide to use shared attributes

* [DOCS] Add docs repository path
2017-06-27 10:13:42 -07:00
spalger 5ca30018c5 [docs] remove metions of time-pattern index patterns 2017-06-23 13:42:24 -07:00
Felix Stürmer a2727ececf [context view] Use _doc for tie-breaking instead of _uid (#12096)
Using fields with docvalues (like `_doc`) for tie-breaking yields
significantly better performance than using `_uid`, which lacks
docvalues at the moment. The downside is that sorting by `_doc` by
default is not stable under all conditions, but better than no
tie-breaking at all.

The new setting `context:tieBreakingFields` enables the user to
customize the list of fields Kibana attempts to use for tie-breaking.
The first field from that list, that is sortable in the current index
pattern, will be used. It defaults to `_doc`, which should change to
`_seq_no` from version 6.0 on.

In addition to just showing a notification, errors that occur while
loading documents from the database will be stored as part of the
`loadingStatus` along with a reason code (if known). This is used to
display more nuanced and helpful error messages to the user.

The first such error message indicates a missing or invalid tiebreaker
field required for sorting the context.
2017-06-08 12:21:52 +02:00
Thomas Neirynck 2270a6c24f Add Region Map Visualization
- Users can now create choropleth maps. This requires configuring an inner join between the results of a term-aggregation and a reference vector layer. This vector layer needs to be in the GeoJson format. By default, Kibana uses vector layers serverd by a data service hosted by Elastic. Users can also bring in their own layers by adding configuration entries in the kibana.yml. These need to point to a CORS-enabled data service that accepts requests from the Kibana application.
- For clarity, the tilemap is renamed to Coordinate Map.
- A new manifest is published by Elastic. this includes metadata for the available tilemap services, as well as metadata for the available vector data layers.
2017-05-31 16:56:02 -04:00
Thomas Neirynck c1e09d5b0e Add aggregation size to Advanced Settings (#11818)
The discover:aggs:terms:size config value was never added to the default values, so when the trash-button is clicked it removes the config completely and causes discover to send an empty size param to visualize.
2017-05-16 16:50:32 -04:00
Chris Cowan c092c4d288 Fixes #11231 - Adds check for max_bucket size for Time Series Visual Builder (#11245)
* Fixes #11231 - Adds check for max_bucket size for Time Series Visual Builder

* Added Math.floor() to bucket calculation; changed error message; changed option description
2017-04-20 05:45:12 -07:00
Felix Stürmer 85facdd04d Show event context (#9198)
This adds a link to the detail view of discover rows to switch to a view of the documents immediately before and after the selected document. Since that view uses the timestamp field of the index pattern, it is only available for time-based indices.

See #9198 for detailed screenshots.
2017-02-22 18:27:49 +01:00
Lukas Olson 909b8c7a0e Improve highlighting by using highlight_query with all_fields enabled (#9671)
* Add all_fields to highlight query to improve highlighting

* Refactor highlighting and move out of _flatten

* Make changes as per @bargs' requests

* Add documentation about highlightAll setting

* Fix docs typo

* Remove unused function

* Remove unused code
2017-02-03 10:44:00 -07:00
Tanya Bragin 5946f8788f Update managing-fields.asciidoc (#9739)
* Update managing-fields.asciidoc

* Remove references to Groovy
* Add information about Painless
* Link to blog for additional examples

* Update managing-fields.asciidoc

Make editorial changes per @debadair's feedback.
2017-01-13 07:54:06 -08:00
Joe Fleming 259767e8cb Add missing settings to Advanced Settings docs (#9691)
* add missing settings to advanced settings docs

* add indexPattern:placeholder

* consistency tweaks
2017-01-11 12:55:09 -07:00
Court Ewing 8895ae110f docs: Overhaul of doc structure for 5.0+ (#8821)
This overhaul of the docs structure puts Kibana's documentation more
inline with the structure that is used in Elasticsearch. This will help
us better organize the docs going forward as more docs are added.

This also includes a few necessary content changes for 5.0.
2016-10-24 21:41:32 -04:00