Skip to content

Add word position setting support - #724

Open
monji024 wants to merge 1 commit into
meilisearch:mainfrom
monji024:add-word-position-setting
Open

monji024 wants to merge 1 commit into
meilisearch:mainfrom
monji024:add-word-position-setting

Conversation

@monji024

@monji024 monji024 commented Nov 27, 2026 •

Copy link
Copy Markdown

Related issue

Fixes #722

What does this PR do?

Adds support for the wordPosition setting

You can now get the setting, update it, or reset it

I've also added tests and code samples for it

PR checklist

  • The changes are described above
  • I've read the contributing guidelines
  • The title describes the changes

All 465 tests pass locally

Summary by CodeRabbit

  • New Features
    • Added support for reading, updating, and resetting an index’s word-position setting.
    • Word-position settings can now be managed alongside other index settings, including through bulk updates and resets.
    • Added Ruby client examples for common word-position setting operations.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Ruby client adds index methods to read, update, and reset the wordPosition setting. Settings specifications and code samples cover the setting’s default, updates, and reset behavior.

Changes: Word-position setting support

Layer / File(s) Summary
Word-position methods and endpoint coverage
lib/meilisearch/index.rb, spec/meilisearch/index/settings_spec.rb, .code-samples.meilisearch.yaml
Meilisearch::Index gains methods to read, update, and reset wordPosition. Specifications cover defaults, updates, resets, nil values, and task results. Code samples show how to read, update, and reset the setting.
Global settings coverage
spec/meilisearch/index/settings_spec.rb
Settings specifications include wordPosition in expected defaults and settings keys. They also cover bulk updates and reset expectations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related issues

  • Issue 723 requests SDK support for wordPosition settings. This pull request adds methods for the setting and coverage for global settings retrieval, updates, and resets.

Suggested reviewers: curquiza

Merge Risk: Minimal · up to 9af99

This change adds Ruby client methods to get, update, and reset the wordPosition index setting, along with specs and code samples. No concrete risk was found, and it looks ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add word position setting support" matches the main change. The PR adds get, update, and reset support for the wordPosition setting in the Ruby SDK, including the Index methods, settings sp…
Linked Issues check Passed [#722] Objectives covered by the PR summary and the changed files:
1. Word-position endpoint methods: lib/meilisearch/index.rb adds word_position() (GET), update_word_position(new_word_position)…
Out of Scope Changes check Passed All changed areas map to #722: the index methods for word-position settings, the settings spec updates for wordPosition, and the three code samples. No unrelated change appears in the summary. The c…
Full details: Title check

Explanation

The title "Add word position setting support" matches the main change. The PR adds get, update, and reset support for the wordPosition setting in the Ruby SDK, including the Index methods, settings spec coverage, and code samples. The title is short, specific, and accurate.

Full details: Linked Issues check

Explanation

[#722] Objectives covered by the PR summary and the changed files:

  1. Word-position endpoint methods: lib/meilisearch/index.rb adds word_position() (GET), update_word_position(new_word_position) (PATCH, returns Models::Task), and reset_word_position() (DELETE, returns Models::Task). The summary states the PATCH and DELETE verbs. The exact path /indexes/{indexUid}/settings/word-position was not confirmed, because the diff tool could not read the changed blobs and the file read was truncated.
  2. Global settings: spec/meilisearch/index/settings_spec.rb adds wordPosition with default { 'enabled' => true } to the settings keys and default-settings expectations. It also covers bulk update and reset to the default. The summary does not state whether the global settings methods in index.rb changed. Their support rests on the spec coverage.
  3. Tests: specs cover the getter, updates with enabled: false, and resets when enabled is nil or the whole argument is nil, plus the dedicated reset method. This covers the issue's disable, read back, reset, and assert-default test flow.
  4. Code samples: .code-samples.meilisearch.yaml adds three Ruby examples for get, update (enabled set to false), and reset. This matches the get_word_position_settings_1, update_word_position_settings_1, and reset_word_position_settings_1 requirements.
    No unmet coding requirement is evident from the supplied evidence.
Full details: Out of Scope Changes check

Explanation

All changed areas map to #722: the index methods for word-position settings, the settings spec updates for wordPosition, and the three code samples. No unrelated change appears in the summary. The changed-file diff could not be read, so the check relies on the supplied summary.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0313f587-cbfd-4a6e-bab9-6a6bf45d9d1c
Commits

Reviewing files that changed from the base of the PR and between 8cf7fe3 and 9af993a.

Files selected for processing: 3

  • .code-samples.meilisearch.yaml
  • lib/meilisearch/index.rb
  • spec/meilisearch/index/settings_spec.rb

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

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.

[Meilisearch v1.58] Add support for the wordPosition indexing setting

1 participant