json in the otput of the tantivy

This commit is contained in:
filipriec
2025-06-11 14:07:22 +02:00
parent 495d77fda5
commit afd9228efa
7 changed files with 91 additions and 38 deletions

View File

@@ -10,11 +10,11 @@ message SearchRequest {
string table_name = 1;
string query = 2;
}
message SearchResponse {
message Hit {
int64 id = 1; // The PostgreSQL row ID
int64 id = 1; // PostgreSQL row ID
float score = 2;
string content_json = 3;
}
repeated Hit hits = 1;
}

Binary file not shown.

View File

@@ -13,13 +13,15 @@ pub struct SearchResponse {
}
/// Nested message and enum types in `SearchResponse`.
pub mod search_response {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hit {
/// The PostgreSQL row ID
/// PostgreSQL row ID
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(float, tag = "2")]
pub score: f32,
#[prost(string, tag = "3")]
pub content_json: ::prost::alloc::string::String,
}
}
/// Generated client implementations.