Skip to content

Default query to match_all instead of query_string - #12583

Closed
lukasolson wants to merge 2 commits into
elastic:masterfrom
lukasolson:matchAll
Closed

lukasolson wants to merge 2 commits into
elastic:masterfrom
lukasolson:matchAll

Conversation

@lukasolson

Copy link
Copy Markdown
Contributor

Depends on #11915.
Fixes #12097.

This PR simply updates the default query (when someone has entered nothing into the query bar) to {"match_all": {}} instead of {"query_string": {"query": "*"}}. This has major impacts on performance in certain cases, especially when there are a large number of fields and there is no default_field set.

(To see the subset of changes related to this PR, look at the most recent commit.)

@Bargs

Bargs commented Jun 30, 2017

Copy link
Copy Markdown
Contributor

@lukasolson want me to just cherry-pick this into my new PR so we don't have to remember to merge it after the fact?

@lukasolson

Copy link
Copy Markdown
Contributor Author

@lukasolson want me to just cherry-pick this into my new PR so we don't have to remember to merge it after the fact?

Yeah, that'd be great.

@weltenwort weltenwort left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if still relevant after the latest cherry-picking

@@ -0,0 +1 @@
export const matchAll = { match_all: {} };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if this is worth putting into a separate file if it only has one use.

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 agree, probably not really necessary. I'll make the change in my PR.

@Bargs Bargs closed this Jul 3, 2017
@dakrone

dakrone commented Jul 5, 2017

Copy link
Copy Markdown
Contributor

@lukasolson @Bargs did this get merged? It looks like it was closed and I was wondering if #12097 can be considered resolved

@lukasolson

Copy link
Copy Markdown
Contributor Author

@dakrone It got pulled into another PR which is still open.

@dakrone

dakrone commented Jul 5, 2017

Copy link
Copy Markdown
Contributor

@lukasolson oh cool, is it #12624 ?

@Bargs

Bargs commented Jul 5, 2017

Copy link
Copy Markdown
Contributor

Yup, that's the one

@lukasolson
lukasolson deleted the matchAll branch March 27, 2018 21:10
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.

5 participants