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

Allow truthy values for enabling weighting #2597

Closed
wants to merge 2 commits into from

Conversation

moritzlang
Copy link

@moritzlang moritzlang commented Feb 18, 2022

Requirements

Documentations show that enabled => 1 can be used to enable the weighting for a field.

Description of the Change

In order to fulfill this behaviour the type check was removed from the evaluation of the field.

Alternate Designs

Possible Drawbacks

Verification Process

Tested locally.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added possibility to enable weighting using truthy values

Credits

@moritzlang

Documentations show that `enabled => 1` can be used to enable the weighting for a field.
- https://www.elasticpress.io/blog/2020/04/custom-fields-and-weighted-search-with-elasticpress/
- https://elasticpress.zendesk.com/hc/en-us/articles/360051543232-Search-all-meta-keys-matching-a-pattern
It also came up on some issues e.g. 10up#2018

In order to fulfill this behaviour the type check was removed from the evaluation of the field.
@felipeelia felipeelia self-assigned this Mar 15, 2022
@felipeelia felipeelia added this to the 4.1.0 milestone Mar 15, 2022
@felipeelia
Copy link
Member

Closing this one in favor of #2673. Thanks, @moritzlang!

@felipeelia felipeelia closed this Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants