thswlsqls opened a new issue, #8675:
URL: https://github.com/apache/paimon/issues/8675

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ f7ec93b3c
   
   **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?**
   - [x] I'm willing to submit a PR!
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to