thswlsqls opened a new issue, #10559: URL: https://github.com/apache/paimon/issues/10559
# [Bug] Lumina raw vector search and refinement ignore the metric persisted in the index **Search before asking** - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. **Paimon version** master @ 937b5e1d5 **Compute Engine** Engine-agnostic (core local read path: Java API, and Spark/Flink when index splits are evaluated locally) **Minimal reproduce step** 1. Keep the table metric at the default `inner_product` and build a lumina index with `create_global_index(..., options => 'lumina.distance.metric=l2')`. Procedure options are not saved to the table schema. 2. Index row 0 = `[2,0]`, then append row 1 = `[3,0]` without indexing it. 3. Search `[1,0]`, limit 1, with `vector-index.search-mode=full` (or index both rows and set `lumina.refine_factor=2`). **What doesn't meet your expectations?** Row 1 is returned with inner-product score 3.0 instead of row 0 with L2 score 0.5. `LuminaVectorGlobalIndexer.metric()` returns the configured metric, which `AbstractDataEvolutionVectorRead.rawSearchMetric()` uses for raw fallback and refinement. A query option `lumina.distance.metric=l2` does not help because `metric()` is never null. **Anything else?** The index metadata already stores `distance.metric`; eslib (#8618) and pypaimon (#9754) use it. Remote engine-task evaluation and raw-only searches are out of scope. **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]
