MultiVectorSimilarity (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.search, interface: MultiVectorSimilarity

Package org.apache.lucene.search

# Interface MultiVectorSimilarity

All Known Implementing Classes:
  `LateInteractionFloatValuesSource.ScoreFunction`

public interface MultiVectorSimilarity
Interface to define the similarity function between multi-vectors

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `compare(float[][] outer, float[][] inner, VectorSimilarityFunction vectorSimilarityFunction)`
  Computes similarity between two multi-vectors using provided `VectorSimilarityFunction`

- ## Method Details

  - ### compare

    float compare(float[][] outer, float[][] inner, VectorSimilarityFunction vectorSimilarityFunction)
    Computes similarity between two multi-vectors using provided `VectorSimilarityFunction`

    Provided multi-vectors can have varying number of composing token vectors, but their token vectors should have the same dimension.

    Parameters:
      `outer` - a multi-vector
      `inner` - another multi-vector
    Returns:
      similarity score between two multi-vectors