pub struct AutocompleteReqPayload {Show 13 fields
pub content_only: Option<Option<bool>>,
pub extend_results: Option<Option<bool>>,
pub filters: Option<Option<Box<ChunkFilter>>>,
pub highlight_options: Option<Option<Box<HighlightOptions>>>,
pub page_size: Option<Option<i64>>,
pub query: String,
pub remove_stop_words: Option<Option<bool>>,
pub score_threshold: Option<Option<f32>>,
pub search_type: SearchMethod,
pub slim_chunks: Option<Option<bool>>,
pub sort_options: Option<Option<Box<SortOptions>>>,
pub use_quote_negated_terms: Option<Option<bool>>,
pub user_id: Option<Option<String>>,
}
Fields§
§content_only: Option<Option<bool>>
Set content_only to true to only returning the chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typically 10-50ms). Default is false.
extend_results: Option<Option<bool>>
If specified to true, this will extend the search results to include non-exact prefix matches of the same search_type such that a full page_size of results are returned. Default is false.
filters: Option<Option<Box<ChunkFilter>>>
§highlight_options: Option<Option<Box<HighlightOptions>>>
§page_size: Option<Option<i64>>
Page size is the number of chunks to fetch. This can be used to fetch more than 10 chunks at a time.
query: String
Query is the search query. This can be any string. The query will be used to create an embedding vector and/or SPLADE vector which will be used to find the result set.
remove_stop_words: Option<Option<bool>>
If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. Queries that are entirely stop words will be preserved.
score_threshold: Option<Option<f32>>
Set score_threshold to a float to filter out chunks with a score below the threshold. This threshold applies before weight and bias modifications. If not specified, this defaults to 0.0.
search_type: SearchMethod
§slim_chunks: Option<Option<bool>>
Set slim_chunks to true to avoid returning the content and chunk_html of the chunks. This is useful for when you want to reduce amount of data over the wire for latency improvement (typically 10-50ms). Default is false.
sort_options: Option<Option<Box<SortOptions>>>
§use_quote_negated_terms: Option<Option<bool>>
If true, quoted and - prefixed words will be parsed from the queries and used as required and negated words respectively. Default is false.
user_id: Option<Option<String>>
User ID is the id of the user who is making the request. This is used to track user interactions with the search results.
Implementations§
Source§impl AutocompleteReqPayload
impl AutocompleteReqPayload
pub fn new(query: String, search_type: SearchMethod) -> AutocompleteReqPayload
Trait Implementations§
Source§impl Clone for AutocompleteReqPayload
impl Clone for AutocompleteReqPayload
Source§fn clone(&self) -> AutocompleteReqPayload
fn clone(&self) -> AutocompleteReqPayload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more