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

Fix keyword expansion and add configuration for auto keyword expansion #101

Merged
merged 4 commits into from
Mar 24, 2024

Conversation

esmarkowski
Copy link
Member

This pull request includes fixes for keyword expansion and adds a new configuration option for auto keyword expansion.

  • :keyword fields should never need .keyword appended to them
  • :text and :string fields get a keyword multifield added by default
  • If any field has a multifield it will be used for aggregations, sorting, etc (by adding the name of the path to the :keyword multifield)
  • The default keyword multifield is attribute_name.keyword

Configuration

Change the default_keyword_field:

Stretchy.configure do |config|
     config.default_keyword_field  = :whatever
end

attribute_name.whatever

Turn off adding keyword fields to :text (and any subclass of text, like :string):

Stretchy.configure do |config|
     config.add_keyword_field_to_text_attributes  = false
end

@esmarkowski esmarkowski self-assigned this Mar 24, 2024
@esmarkowski esmarkowski merged commit 4df8032 into main Mar 24, 2024
5 checks passed
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.

1 participant