pub struct TextQuery {
pub text_space_id: TextSpaceId,
pub query: String,
pub algorithm: QueryAlgorithm,
pub top_k: Option<usize>,
pub channel_k: Option<usize>,
}Expand description
Text query input passed to ValiseFile::query_text.
Fields§
§text_space_id: TextSpaceId§query: String§algorithm: QueryAlgorithm§top_k: Option<usize>Optional cap on returned hits. When Some(k), the retriever
uses a bounded-K heap inside the algorithm — much cheaper than
sorting the entire touched set and truncating at the boundary.
None keeps the legacy behavior of returning every hit with a
non-zero score, sorted.
channel_k: Option<usize>Per-term posting-list read budget for the impact-sorted
vote-then-rerank pipeline used by the cosine scorers. Posting
lists are sorted by descending term-frequency at decode time;
the vote phase reads at most channel_k entries per query
term, which bounds the candidate set to |q| × channel_k
regardless of corpus size. The rerank phase then recomputes
the exact score (full idf / normalization / L2) only for the
top rerank candidates via binary search on the original
frame_id-sorted posting list. None disables the cap and
retains exact full-posting scoring.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextQuery
impl RefUnwindSafe for TextQuery
impl Send for TextQuery
impl Sync for TextQuery
impl Unpin for TextQuery
impl UnsafeUnpin for TextQuery
impl UnwindSafe for TextQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more