syntax = "proto3";
package topk.data.v1;

import "topk/data/v1/value.proto";

message FunctionExpr {
  message VectorDistance {
    string field = 1;
    Vector query = 2;
  }

  message Bm25Score {}

  message SemanticSimilarity {
    // Field with semantic index to compute similarity against.
    string field = 1;
    // Query to embed and compute similarity with.
    string query = 2;
  }

  oneof func {
    VectorDistance vector_distance = 1;
    Bm25Score bm25_score = 2;
    SemanticSimilarity semantic_similarity = 3;
  }
}
