Skip to content

[Bug] Lumina enum-form distance.metric breaks every search #8675

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ f7ec93b

Compute Engine
Engine-agnostic (core / paimon-lumina)

Minimal reproduce step
Build a Lumina vector index with the metric configured in enum form, e.g. lumina.distance.metric=L2 (or COSINE, INNER_PRODUCT), then run any search. LuminaVectorIndexOptions (paimon-lumina/src/main/java/org/apache/paimon/lumina/index/LuminaVectorIndexOptions.java, line 124/127) stores the raw string L2 into the index meta through buildLuminaOptions().

What doesn't meet your expectations?
Every search fails: the read path LuminaIndexMeta.metric() calls LuminaVectorMetric.fromLuminaName(), which only matches native lowercase names (l2), so L2 throws IllegalArgumentException: Unknown lumina metric name: L2. The metric should be normalized to its native name when persisted.

Anything else?
The sibling LuminaVectorGlobalIndexer.metric() already normalizes via options.metric().getLuminaName(). parseMetric()'s Javadoc explicitly documents accepting enum-form names, so the meta must persist the native form.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions