Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the size of saved searches in Dashboards #11758

Closed
marius-dr opened this issue May 12, 2017 · 14 comments
Closed

Limit the size of saved searches in Dashboards #11758

marius-dr opened this issue May 12, 2017 · 14 comments
Labels
bug Fixes for quality problems that affect the customer experience discuss Feature:Dashboard Dashboard related features Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@marius-dr
Copy link
Member

marius-dr commented May 12, 2017

Currently there is a way to limit the number of results shown in the discover page, where you create the saved searches. By modifying discover:sampleSize in the Advanced settings you can limit them.
But if you then import the saved object inside a dashboard, the limit won't be there and it will show all of the results.
I see 2 ways of solving this, each with their pros and cons:

  • make the dasboard saved search take in account the setting when doing the search
  • save the setting with the saved search so you can have multiple settings for multiple saved searches.
    size
@LeeDr
Copy link

LeeDr commented May 12, 2017

The advanced setting discover:sampleSize is a global setting that I think should affect all saved searches (regardless of whether they're used in a dashboard or not). Are you saying there's a bug and the saved search in a dashboard isn't using that setting? If so, we should probably file that as a separate "bug" issue.

Regardless of the potential bug above, I do see some value saving a limit per saved search. For some searches you might only need the most recent 10 results to show in the dashboard. It seems inefficient to query and return 500 or discover:sampleSize in that case. One index could have very small docs and another could be very large. So now I'm thinking about setting that as a per-index setting...

@marius-dr
Copy link
Member Author

Yep, it's a bug more than an ER. If you set the size inside the object it will take the discover.sampleSize into account in the dashboard as well. Which is clearly not an intended behavior, either with this setting or with how a saved search is saved (withouth the `size' field).

@marius-dr marius-dr added bug Fixes for quality problems that affect the customer experience and removed release_note:enhancement labels May 12, 2017
@stacey-gammon
Copy link
Contributor

I'm confused. The saved searches inside dashboard do take into account discover:sampleSize. Unless there is a specific way to repro? Or I am misunderstanding the context?

screen shot 2017-05-25 at 1 54 54 pm

screen shot 2017-05-25 at 1 55 00 pm

screen shot 2017-05-25 at 1 55 30 pm

@marius-dr
Copy link
Member Author

This is the discuss ticket: https://discuss.elastic.co/t/limit-the-number-of-search-result-in-a-dashboard/85568

I've tried reproducing it now, but it seems ok on 5.4.1. So maybe we can close it, it was probably fixed in the meantime by something unrelated.

@stacey-gammon
Copy link
Contributor

Okay, I'll go ahead and close. Please re-open if anyone comes up with a reproducible scenario!

@NeVraX182
Copy link

I'm using Kibana 6.0.0 and the size parameter in the saved search is not taken into account when used in a dashboard.

@Rhysol
Copy link

Rhysol commented Nov 23, 2017

@NeVraX182 @marius-dr I have the same problem, my Kibana version is 6.0.0. I think limit the result size is really important and useful.

@ghost
Copy link

ghost commented Nov 30, 2017

Using 5.6.4 and size parameter for save search is not taken in account in both discover and dashboard mode. only discover:sampleSize is taken in account for everything.

We should be able to use size to override the sampleSize in a search.

@grahamwhaley
Copy link

I have a very related query, in fact I think it is almost the same as the original request over at https://discuss.elastic.co/t/limit-the-number-of-search-result-in-a-dashboard/85568/10

I want to construct a visualisation (currently trying using a line chart), that is basically 'show me the last 10 events of this type'. The obvious way to achieve that would seem to set the size field in the query itself, but afaict, there is no way to add that to the visualisation setup.
This is not about setting and applying the global query size parameter, it is about setting a per-visualisation parameter, and not having it over-ridden by the system defaults.
I'm interested in applying this to both time series based data and non-time indexes (I am experimenting with both). What I want is a panel showing 'our last 10 results' for instance.
I hope that makes sense. If anybody knows a way to do this (and I just tried editing the visualisation json in the management/saved_objects dialog to add "size": 10 for instance, and that does not seem to get passed through to the query...) - please post here :-)
I am on ELK stack v7.3.

@ravimodha-tudip521
Copy link

ravimodha-tudip521 commented Dec 6, 2019

@marius-dr, I am using version 6.8.3 and i am still getting this issue. Is there any fix for this?

@LeeDr LeeDr added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Sharing DO NOT USE labels Jun 18, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@u724164
Copy link

u724164 commented Apr 10, 2021

Hi there,

Good Day to the ElasticSearch Team & Community.

I'm a fairly new user of Elastic Search, couple of weeks old, and have found the community to be very helpful in resolving barriers in my path of using ES.

I'm writing here to inform that in V 7.12 as well, like others have mentioned before me, the "size" parameter is not being used while loading the search panel in Dashboards. Is there any other solution available for this? I want to display 10-20 results in 1 page and allow user to navigate through the result set to a maximum of discover.sampleSize/size pages.

If anybody knows how to do this then kindly help me.

Thanks

@Fondaz
Copy link

Fondaz commented Feb 18, 2022

Same here with 7.11.2, I want to use a per-visualisation size, but the default discover:sampleSize is taken in account. For obvious reason I can't modify discover:sampleSize and I want it to remain 500, meanwhile in my visualization I only want 10 results.

jughosta added a commit that referenced this issue Oct 19, 2023
…th a saved search (#157269)

- Closes #94140
- #11758
- #4060
- #3220
- #23307
- Closes #131130 

## Summary

This PR allows to change current sample size right from Discover page,
no need to modify the global default value.

Saved search panels on Dashboard will also use the saved value to fetch
only the requested sample size. This customisation was requested by many
customers as it will allow to load Dashboards faster.

Current range for the slider: from 10 to 1000 (with a step 10).

<img width="400" alt="Screenshot 2023-10-09 at 11 10 52"
src="https://github.com/elastic/kibana/assets/1415710/74e2e4ad-9929-4a44-8d85-c2baafccbaa6">


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
@jughosta
Copy link
Contributor

It will be possible to configure sample size per dashboard panel from 8.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience discuss Feature:Dashboard Dashboard related features Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests