Skip to content

Make filter editor suggestions opt-in#12710

Merged
lukasolson merged 3 commits intoelastic:masterfrom
lukasolson:suggestions
Jul 11, 2017
Merged

Make filter editor suggestions opt-in#12710
lukasolson merged 3 commits intoelastic:masterfrom
lukasolson:suggestions

Conversation

@lukasolson
Copy link
Copy Markdown
Contributor

@lukasolson lukasolson commented Jul 7, 2017

Fixes #12692.

With the addition of filter editors, some users with large datasets were experiencing slow queries when using the filter editor autocomplete.

This PR adds a new advanced option, filterEditor:suggestValues, which defaults to false. When set to false, the filter editor will no longer offer suggestions for values for particular fields. When set to true, however, it will continue to function as it has.

In addition, it adds an additional parameter to the terms agg to increase performance: shard_size. See the docs for more information.

Copy link
Copy Markdown
Contributor

@Bargs Bargs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one minor suggestion. No need to re-review.

const body = getBody({
field,
include,
shard_size: 10
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably include the regular size parameter here as well instead of relying on the default.

const body = getBody({ field, include });
const body = getBody({
field,
include,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this parameter is partly what's hurting us. I don't know how it's implemented, but a regex with a leading wildcard is suspicious. Something to investigate when we try to fix the performance later.

@lukasolson lukasolson merged commit 0550805 into elastic:master Jul 11, 2017
lukasolson added a commit to lukasolson/kibana that referenced this pull request Jul 11, 2017
* Add shard_size to the suggestions terms agg request

* Make filter editor suggestions opt-in

* Add size parameter
lukasolson added a commit to lukasolson/kibana that referenced this pull request Jul 11, 2017
* Add shard_size to the suggestions terms agg request

* Make filter editor suggestions opt-in

* Add size parameter
@lukasolson
Copy link
Copy Markdown
Contributor Author

Backported to 5.x (5.6.0) in d2675d4.
Backported to 5.5 (5.5.1) in e640832.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants