Skip to content

Build Not yet confirmed elsewhere1 publisher 2 min read Published

Milvus regex filtering on sealed VARCHAR columns now prunes candidates with FMIndex literals instead of only the longest one

Milvus regex filters on sealed VARCHAR columns now use every bounded literal and its AND/OR links to prune rows via FMIndex, a dev.to post says. RE2 then checks only the surviving candidates, so the saving depends on how selective a pattern's literals are in each segment.

The Engineer · Build desk

How we use AI Send a correction

Illustration accompanying Milvus regex filtering on sealed VARCHAR columns now prunes candidates with FMIndex literals instead of only the longest one
Generated illustration
Milvus regex pruning now follows AND/OR literals How the dev.to post describes Milvus regex candidate pruning. The post reports no measured timings or throughput, so there are no numbers to chart.

Milvus regex filtering. Before, only the longest literal generated candidate rows. Now each AND group uses its lowest-cost literal and all OR branches form combined candidate bitmaps. RE2 rechecks candidates. With no usable literal or an exceeded budget, it scans. No timings are reported.

Milvus regex pruning now follows AND/OR literals
WhoHowKindClaim
Previous approachExtracted only the longest literal substring from a regex pattern to generate candidate rowsprecedent1
AND groupsThe literal candidate with the lowest cost is chosen for each AND groupdecision4
OR branchesAll OR branches are preserved to form combined candidate bitmapscapability4
RE2 matcherCompiled once and stored for reuse as the final recheck filter on candidate rowscapability5
Scan fallbackFalls back to scanning with no usable literal candidates or an exceeded candidate generation budgetconstraint8
Performance figuresThe post reports no measured timings or throughput figures for the changeconstraint13

What happened

  • Before the change, Milvus extracted only the longest literal substring from a regex pattern to pick candidate rows.
  • Regex filtering on VARCHAR columns scanned full row bytes even when the pattern held selective literals that could have narrowed the candidates.
  • For each AND group the planner takes the lowest-cost literal candidate, and every OR branch is kept and merged into the combined candidate bitmap.
  • The RE2 matcher is compiled once and stored, then reused as the final recheck on candidate rows.
  • The filtering preserves the original input bitmaps and NULL validity.

Why it matters

  • capability Alternations such as (foo|bar) can now contribute to pruning, because OR branches are kept and combined into one bitmap instead of being dropped.
  • constraint A pattern with no usable literal, or one that exceeds the candidate generation budget, gets no pruning and scans as before.
  • decision The described path covers sealed VARCHAR columns, and the planner ranks literals per segment, so the gain has to be measured on a team's own patterns and its own segment mix.

On a sealed VARCHAR column the new path runs in four steps, according to the post [11]:

1. Parse the regex and pull out every bounded literal, keeping the AND/OR structure. 2. Ask the FMIndex for a candidate bitmap per literal. 3. Combine the bitmaps along that structure. 4. Run the compiled RE2 matcher on the surviving rows only.

The post's example pattern is `(foo|bar).*baz`. The old code took `baz` and ignored `foo` and `bar` [10], so two of the pattern's three literals did no pruning [14]. The example is loose, though. All three literals are three characters long [15], so none is the longest, and the post does not say which candidate the new planner keeps for this pattern.

The planner counts distinct literals in each segment to judge selectivity and cost [3]. In our view, that makes the outcome on a pattern like this depend on data. If `baz` is rarer in a segment than the `foo`/`bar` pair, `baz` alone may still be the best filter there. If the pair is rarer, the new path wins.

We think the final recheck is what makes the pruning safe. The bitmaps only have to include every matching row, and RE2 removes the false positives. A FilteredRE2 adapter maps extracted literals to FMIndex candidates using conservative structural checks [9]. Immutable preparations, namely the compiled regex and the literal extraction, are cached thread-locally [6].

The post does not include benchmark figures [13]. For a speedup to transfer to another deployment, the patterns would need bounded literals that are rare in each segment, and candidate generation would need to stay inside its budget [8].

What to watch

  • Whether Milvus publishes timings for the change, and on what mix of regex patterns and segment sizes.
  • The size of the candidate generation budget that triggers the scan fallback, and whether operators can set it.
  • Whether the same candidate-and-recheck routing is extended beyond sealed VARCHAR columns.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence35
Adoption
Insufficient
Hype gap+20
Incentives
Insufficient
Confidence50
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    Before the change, Milvus extracted only the longest literal substring from a regex pattern to generate candidate rows for filtering.

    Reported Supported Source: dev.to post, Accelerating Regex Filtering in Milvus with FMIndex Candidate PruningView cited source
  2. [2]

    Regex filtering on VARCHAR columns used to scan full row bytes even when the regex pattern contained selective literals that could narrow candidates.

    Reported Supported Source: dev.to postView cited source
  3. [3]

    The system counts distinct literals in each data segment to assess their selectivity and cost.

    Reported Supported Source: dev.to postView cited source

Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.

Add to ChatGPTAdd to Claude

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · October 13, 2026

    Accelerating Regex Filtering in Milvus with FMIndex Candidate Pruning

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories