Skip to content

feat: support automatically discovered text index fields - #369

Merged
crimson-gao merged 4 commits into
aliyun:masterfrom
sls-dev-agent:feat/auto-text-index-fields
Sep 15, 2026
Merged

crimson-gao merged 4 commits into
aliyun:masterfrom
sls-dev-agent:feat/auto-text-index-fields

Conversation

@sls-dev-agent

@sls-dev-agent sls-dev-agent commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Index configuration responses currently discard line.auto_text_keys, so reading an index and updating another setting can clear the discovered fields. Add the optional string list to IndexLineConfig, JSON parsing/serialization and type stubs. Default auto_key_detect to False and auto_text_keys to an empty list; preserve the existing explicit None behavior for the switch and positional argument order.

Document that updates replace the complete list, and that discovered text fields reuse the line settings. Disabling discovery stops automatic growth; existing auto_text_keys remain effective and are retained unless explicitly cleared. Add offline tests for create/get/update, preserving fields, replacing/clearing the list, create/get/update with discovery disabled, legacy responses and existing optional arguments. Bump 0.9.51 to 0.9.52 and update HISTORY.md.

This feature reuses the existing service-side auto_key_detect switch and adds auto_text_keys. Each key in the array is treated as an automatically discovered text field index with statistical analysis enabled. Tokenization and case sensitivity inherit the full-text (line) index settings.

Validation

  • Build image: package installation and python3 -m pytest tests/ci/build-test/ -q — 8 passed.
  • Final diff and commit self-review completed, including compatibility, scope and sensitive/local file checks.
  • Live staging validation: four GetIndex → UpdateIndex → GetIndex scenarios passed (discovery disabled/enabled, true-to-false with fields retained, and clearing the list). Actual request JSON and server readback were checked; all calls returned HTTP 200. The original index configuration was restored and verified. CreateIndex remains covered by offline tests.

@crimson-gao
crimson-gao merged commit 20d58eb into aliyun:master Sep 15, 2026
12 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.

2 participants