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

[DOCS] Doc improvements for query rewrite parameter #65254

Open
immavalls opened this issue Nov 19, 2020 · 3 comments
Open

[DOCS] Doc improvements for query rewrite parameter #65254

immavalls opened this issue Nov 19, 2020 · 3 comments
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories Team:Docs Meta label for docs team Team:Search Meta label for search team

Comments

@immavalls
Copy link
Contributor

Elasticsearch version (bin/elasticsearch --version): 7.x

Plugins installed: []

JVM version (java -version): N/A

OS version (uname -a if on a Unix-like system): N/A

Description of the problem including expected versus actual behavior:

In version 6.8 the fuzzy query builder sets the rewrite method to constant_score if the clause is in a filter context and the option has not been set explicitly. This heuristic was lost when refactoring in 7.x but our docs still reflect constant_score as the default.

This was a finding by @jimczi and @cbuescher when troubleshooting an upgrade case, and they asked to open an issue to keep track of the doc improvement needed.

@immavalls immavalls added >docs General docs changes needs:triage Requires assignment of a team area label labels Nov 19, 2020
@elasticmachine elasticmachine added the Team:Docs Meta label for docs team label Nov 19, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@romseygeek romseygeek removed the needs:triage Requires assignment of a team area label label Nov 20, 2020
@cbuescher
Copy link
Member

Looking at the code a bit more, the prefix, wildcard and regex queries seem to default to constant_score rewrites in absence of a specific rewrite method, while fuzzy and using the fuzzy option in query_string seem to use top_terms_blended_freqs_N via Lucenes FuzzyQuery ctor.
I'm wondering if we should change the docs or if we should consider changing the default to constant_score everywhere. For example, it seems we expect QueryStringQueryBuilder to default to constant_score in absence of a query parameter here but that doesn't get used in all cases currently (e.g. QueryStringQueryParser#getFuzzyQuerySingle doesn't seem to re-set the rewrite methode while QueryStringQueryParser#newFuzzyQuery does).

@cbuescher cbuescher added the :Search/Search Search-related issues that do not fall into other categories label Nov 20, 2020
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Nov 20, 2020
@cbuescher cbuescher self-assigned this Nov 20, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@debadair debadair removed the Team:Docs Meta label for docs team label Apr 27, 2022
@debadair debadair changed the title Doc improvements for query rewrite parameter [DOCS] Doc improvements for query rewrite parameter Apr 27, 2022
@javanna javanna assigned abdonpijpelink and unassigned cbuescher May 3, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label May 3, 2023
@abdonpijpelink abdonpijpelink removed their assignment Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search/Search Search-related issues that do not fall into other categories Team:Docs Meta label for docs team Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

7 participants