add the searches route and fix a few broken things

This commit is contained in:
Tamo 2024-12-23 15:58:52 +01:00
parent 78f6f22a80
commit 04e4586fb3
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
8 changed files with 196 additions and 43 deletions

View file

@ -13,6 +13,7 @@ use matching_words::{MatchType, PartialMatch};
use r#match::{Match, MatchPosition};
use serde::Serialize;
use simple_token_kind::SimpleTokenKind;
use utoipa::ToSchema;
const DEFAULT_CROP_MARKER: &str = "";
const DEFAULT_HIGHLIGHT_PREFIX: &str = "<em>";
@ -100,7 +101,7 @@ impl FormatOptions {
}
}
#[derive(Serialize, Debug, Clone, PartialEq, Eq)]
#[derive(Serialize, Debug, Clone, PartialEq, Eq, ToSchema)]
pub struct MatchBounds {
pub start: usize,
pub length: usize,