Skip to content

[Bug] Lumina raw vector search and refinement ignore the metric persisted in the index #10559

Closed

Description

@thswlsqls

[Bug] Lumina raw vector search and refinement ignore the metric persisted in the index

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ 937b5e1

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?

  • I'm willing to submit a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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