Search before asking
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?
Search before asking
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(orCOSINE,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 stringL2into the index meta throughbuildLuminaOptions().What doesn't meet your expectations?
Every search fails: the read path
LuminaIndexMeta.metric()callsLuminaVectorMetric.fromLuminaName(), which only matches native lowercase names (l2), soL2throwsIllegalArgumentException: Unknown lumina metric name: L2. The metric should be normalized to its native name when persisted.Anything else?
The sibling
LuminaVectorGlobalIndexer.metric()already normalizes viaoptions.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?