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

Remove all_fields:true in favour of fields:* #25551

Closed
jpountz opened this issue Jul 5, 2017 · 4 comments
Closed

Remove all_fields:true in favour of fields:* #25551

jpountz opened this issue Jul 5, 2017 · 4 comments
Labels
>enhancement help wanted adoptme :Search/Search Search-related issues that do not fall into other categories

Comments

@jpountz
Copy link
Contributor

jpountz commented Jul 5, 2017

all_fields only exists because fields:* queries some fields that are not suitable for querying, and the query ultimately fails with a weird exception. We should fix fields:* to do the right thing and remove the all_fields option.

@Bargs
Copy link

Bargs commented Jul 5, 2017

This would be a tremendous help for me in elastic/kibana#12624, currently I can only generate a query against all fields by abusing the query_string query.

@jpountz
Copy link
Contributor Author

jpountz commented Jul 7, 2017

Discussed in FixitFriday. Let's do it!

jimczi added a commit to jimczi/elasticsearch that referenced this issue Jul 21, 2017
This commit changes the way we handle field expansion in `match`, `multi_match` and `query_string` query.
 The main changes are:

- For exact field name, the new behavior is to rewrite to a matchnodocs query when the field name is not found in the mapping.

- For partial field names (with `*` suffix), the expansion is done only on `keyword`, `text`, `date` and `number` field types. Other field types are simply ignored.

- For all fields (`*`), the expansion is done on accepted field types only (see above) and metadata fields are also filtered.

- The `*` notation can also be used to set `default_field` option on`query_string` query. This should replace the needs for the extra option `use_all_fields` which is deprecated in this change.

This commit also rewrites simple `*` query to matchalldocs query when all fields are requested (Fixes elastic#25556).

The same change should be done on `simple_query_string` for completeness.

Relates elastic#25551
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
@talevy
Copy link
Contributor

talevy commented Mar 16, 2018

@jimczi can this now be safely done after your refactor?

@talevy talevy added :Search/Search Search-related issues that do not fall into other categories and removed :Search/Search Search-related issues that do not fall into other categories labels Mar 16, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

jimczi added a commit to jimczi/elasticsearch that referenced this issue Mar 22, 2018
This commit removes some parameters deprecated in 6.x (or 5.x):
`use_dismax`, `split_on_whitespace`, `all_fields` and `lowercase_expanded_terms`.

Closes elastic#25551
jimczi added a commit that referenced this issue Mar 22, 2018
This commit removes some parameters deprecated in 6.x (or 5.x):
`use_dismax`, `split_on_whitespace`, `all_fields` and `lowercase_expanded_terms`.

Closes #25551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement help wanted adoptme :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

5 participants