Changing the default query in discovery

(Alex Cline Bb) #1

We've disabled the _all field in our indexes, so the default query of "" doesn't work. We instead use "tags:". Is there a way to make this the new default when users open the Discover interface? They get confused when results load, but resubmitting the query gives them a 'No results found' sad face.

(Joe Fleming) #2

Not directly - you could pass it in as part of the URL you ask users to use, but that's the only option right now.

It seems like a useful advanced setting in Kibana though. I'd encourage you to open a new issue asking for it as an enhancement.

(Rashid Khan) #3

This actually is possible. Add the default_field parameter to query:queryString:options in Advanced Settings, see for other options.

(Alex Cline Bb) #4

Thanks Rashid.

This works because it configures which field the "*" is searching. I'd still like the ability to change the default search to "tags:*" since this will better train my users to build searches using field names.

I'm going to leave the Github feature request open since it addresses a different problem than your solution.

(system) #5