How to change the response default_limit in data explorer?


What is the best way to set the default_limit to something like 12345678 ?
Suppose that I need and I want more than 1000 rows.


I can’t figure out what default_limit you’re talking about. I don’t see that in site_settings.yml. What are you trying to do? And are you trying to do it in a plugin or theme component (since you posted in dev)?

1 Like

The data-explorer plugin’s default_limit…

1 Like

Ok, the only way is to set another value like this:
I was hoping there was a better way in Discourse’s settings UI.

./launcher enter app
cd /var/www/discourse/plugins/discourse-data-explorer/
sed -i 's/QUERY_RESULT_DEFAULT_LIMIT = 1000/QUERY_RESULT_DEFAULT_LIMIT = 12345678/g' /var/www/discourse/plugins/discourse-data-explorer/plugin.rb
sed -i 's/QUERY_RESULT_MAX_LIMIT = 1000/QUERY_RESULT_MAX_LIMIT = 12345678/g' /var/www/discourse/plugins/discourse-data-explorer/plugin.rb

Certainly not the only way.

As per my link, you can fork the plugin, change the constant and clone your fork.

You could always PR a plugin setting to that plugin …

1 Like

Not the only way. It’s possible to make changes like that with launcher. You can log at the other templates for examples of how to make changes to files.

1 Like

If this isn’t the only way, can you provide an example thanks.

They recently change the code to a new hidden settings…

cd /var/discourse
./launcher enter app
sed -i ‘s/QUERY_RESULT_DEFAULT_LIMIT = 1000/QUERY_RESULT_DEFAULT_LIMIT = 10000000/g’ /var/www/discourse/plugins/discourse-data-explorer/plugin.rb
sed -i ‘s/QUERY_RESULT_MAX_LIMIT = 1000/QUERY_RESULT_MAX_LIMIT = 10000000/g’ /var/www/discourse/plugins/discourse-data-explorer/plugin.rb
sed -i ‘s/default: 1000/default: 10000000/g’ plugins/discourse-data-explorer/config/settings.yml
sed -i ‘s/max: 10000/max: 10000000/g’ plugins/discourse-data-explorer/config/settings.yml
rails c