Skip to content

docs: runtime property reindex (1.39)#476

Draft
g-despot wants to merge 5 commits into
v1-39/mainfrom
v1-39/property-reindex
Draft

docs: runtime property reindex (1.39)#476
g-despot wants to merge 5 commits into
v1-39/mainfrom
v1-39/property-reindex

Conversation

@g-despot

Copy link
Copy Markdown
Contributor

Documents the runtime property reindex API: add, change, rebuild and check inverted indexes on an existing property without recreating the collection.

Draft: depends on weaviate/weaviate#12252 (server) and weaviate/weaviate-python-client#2098 (client), both unmerged.

  • New Update inverted indexes at runtime section in inverted-index.mdx, placed above the existing v1.36 Drop section so the page reads add, check, rebuild, drop.
  • Four snippet blocks in manage-data.collections.py, all verified against a 1.39.0-dev server.
  • Python only for now, since no other client implements this. The new tabs omit groupId so a single-option group cannot overwrite the reader's page-wide language choice.

Docs CI stays green today. The new blocks sit behind a server-version guard placed outside the snippet markers and rendered with pyindent, so readers see flat copy-pasteable Python with no scaffolding. Verified in both directions: skipped with zero output on 1.38.0, fully executed on 1.39.0-dev.

At GA: bump tests/docker-compose-anon.yml:11 to a released 1.39 and all four blocks start executing. No snippet edits needed.

Two things the docs work surfaced that are worth fixing client-side before ship:

  1. The client prefixes the 422 in-flight conflict with Property may not exist!, which contradicts the accurate server message printed immediately below it.
  2. Enabling a searchable index requires tokenization=, costing a round trip to learn something the client could infer from the property or reject locally.

Site build passes.

g-despot added 2 commits July 20, 2026 16:23
Add a "Update inverted indexes at runtime" section to the inverted index
page covering update_property_index, get_property_indexes,
rebuild_property_index and cancel_property_index_task.

Call out the two behaviours most likely to trip users up: enabling a
searchable index always requires a tokenization argument, and tokenization
is a property-level setting, so migrating it on one index also changes what
the other index on that property reports.

The examples are Python only, since that is the only client with this API
so far. The section says so above the first code block, and the new Tabs
blocks drop groupId so a single-language tab cannot overwrite the reader's
page-wide language selection.

The snippets are guarded on the server version so they run on 1.39 and are
skipped on the 1.38 image pinned in tests/docker-compose-anon.yml, keeping
docs CI green. The guard sits outside the rendered markers and the blocks
render with pyindent, so readers see plain copy-pasteable code. Bump that
compose image to a released 1.39 to start executing these snippets in CI.
Demonstrate the tokenization change path, which the "Add or change an
index" heading promised but only described in prose. The new example
changes a searchable index tokenization and then prints both indexes on
that property, so the effect on the filterable index is visible rather
than asserted. This is the case with the silent consequence for filter
matching, so it is worth showing.

Rework the admonitions so severity tracks risk. The missing tokenization
argument fails immediately with a self-describing error, so it is a note.
The tokenization change is silent and alters how live filters match, so it
keeps the caution and its title now states the consequence instead of the
mechanism.

Also: use US English for "canceled", standardize on "change" rather than
mixing in "migrate", say that the call returns before the index is built
and point to the status section for polling, refer to each index's status
rather than its state, move the tenants restriction for adding and changing
into the Add section, and link the forward reference to the Drop section.

Note that pending and indexing can pass too quickly to observe on a small
collection, and that indexing can persist briefly after the work finishes
while the new index is swapped in, so readers wait for ready.

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

g-despot added 3 commits July 21, 2026 08:47
Move client method names and client parameter names out of the prose and
into the code blocks, where they belong. The text now describes each
operation in plain words (adding or changing an index, rebuilding, canceling
a running rebuild, listing a collection's indexes, limiting a rebuild to
specific tenants) and lets the Python examples show the exact calls.

Keep the values that are the same across every client and are genuine API
or server concepts: the NO_OP status, the pending, indexing and ready
lifecycle states, task IDs, tenants, tokenization, and the searchable and
filterable index types. Reword the progress sentence to avoid a
language-specific null literal while keeping progress and status as concepts.

Code blocks are unchanged.
The client PR now exports a PropertyIndexType enum, so the four runtime
reindex blocks pass the index type as PropertyIndexType.SEARCHABLE,
PropertyIndexType.FILTERABLE and PropertyIndexType.RANGE_FILTERS instead
of string literals, and import the enum alongside the other config
classes. Each rendered block imports it so the example stays copy-pasteable
on its own.

The read-side status check keeps its string comparison: the returned index
type is still a plain string, and it compares equal to the enum member
because the enum subclasses str, so the assertion holds either way.

The enum import stays inside the server-version guard, so on the client
version docs CI pins today, which predates the enum, the guarded block is
never entered and the file still imports and runs. The pre-existing v1.36
drop snippet keeps its string literals for the same reason: it runs
unguarded and its import must resolve on the pinned client.
The Python client scoped the reindex type names to inverted indexes, so the
four runtime reindex blocks import and use InvertedIndexType in place of
PropertyIndexType, and their inline output comments now show
InvertedIndexTaskStatus and InvertedIndexState, which is what the client
prints. The enum members are unchanged, so the calls are the same shape.

The import stays inside the server-version guard, so on the client version
docs CI pins today, which has neither name, the guarded block is never
entered and the file still imports and runs. The v1.36 drop snippet keeps
its string literals for that reason, and the prose is unchanged because it
never named a client type.
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