Struct DocumentsApiClient

Source
pub struct DocumentsApiClient { /* private fields */ }

Implementations§

Source§

impl DocumentsApiClient

Source

pub fn new(configuration: Arc<Configuration>) -> Self

Trait Implementations§

Source§

impl DocumentsApi for DocumentsApiClient

Source§

fn delete_document<'life0, 'async_trait>( &'life0 self, params: DeleteDocumentParams, ) -> Pin<Box<dyn Future<Output = Result<Value, Error<DeleteDocumentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete an individual document from a collection by using its ID.

Source§

fn delete_documents<'life0, 'async_trait>( &'life0 self, params: DeleteDocumentsParams, ) -> Pin<Box<dyn Future<Output = Result<DeleteDocuments200Response, Error<DeleteDocumentsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a bunch of documents that match a specific filter condition. Use the batch_size parameter to control the number of documents that should deleted at a time. A larger value will speed up deletions, but will impact performance of other operations running on the server.

Source§

fn export_documents<'life0, 'async_trait>( &'life0 self, params: ExportDocumentsParams, ) -> Pin<Box<dyn Future<Output = Result<String, Error<ExportDocumentsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Export all documents in a collection in JSON lines format.

Source§

fn get_document<'life0, 'async_trait>( &'life0 self, params: GetDocumentParams, ) -> Pin<Box<dyn Future<Output = Result<Value, Error<GetDocumentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetch an individual document from a collection by using its ID.

Source§

fn get_search_override<'life0, 'async_trait>( &'life0 self, params: GetSearchOverrideParams, ) -> Pin<Box<dyn Future<Output = Result<SearchOverride, Error<GetSearchOverrideError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the details of a search override, given its id.

Source§

fn get_search_synonym<'life0, 'async_trait>( &'life0 self, params: GetSearchSynonymParams, ) -> Pin<Box<dyn Future<Output = Result<SearchSynonym, Error<GetSearchSynonymError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the details of a search synonym, given its id.

Source§

fn import_documents<'life0, 'async_trait>( &'life0 self, params: ImportDocumentsParams, ) -> Pin<Box<dyn Future<Output = Result<String, Error<ImportDocumentsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The documents to be imported must be formatted in a newline delimited JSON structure. You can feed the output file from a Typesense export operation directly as import.

Source§

fn index_document<'life0, 'async_trait>( &'life0 self, params: IndexDocumentParams, ) -> Pin<Box<dyn Future<Output = Result<Value, Error<IndexDocumentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

A document to be indexed in a given collection must conform to the schema of the collection.

This is especially useful to avoid round-trip network latencies incurred otherwise if each of these requests are sent in separate HTTP requests. You can also use this feature to do a federated search across multiple collections in a single HTTP request.

Source§

fn search_collection<'life0, 'async_trait>( &'life0 self, params: SearchCollectionParams, ) -> Pin<Box<dyn Future<Output = Result<SearchResult, Error<SearchCollectionError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Search for documents in a collection that match the search criteria.

Source§

fn update_document<'life0, 'async_trait>( &'life0 self, params: UpdateDocumentParams, ) -> Pin<Box<dyn Future<Output = Result<Value, Error<UpdateDocumentError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update an individual document from a collection by using its ID. The update can be partial.

Source§

fn update_documents<'life0, 'async_trait>( &'life0 self, params: UpdateDocumentsParams, ) -> Pin<Box<dyn Future<Output = Result<UpdateDocuments200Response, Error<UpdateDocumentsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The filter_by query parameter is used to filter to specify a condition against which the documents are matched. The request body contains the fields that should be updated for any documents that match the filter condition. This endpoint is only available if the Typesense server is version 0.25.0.rc12 or later.

Source§

fn upsert_search_override<'life0, 'async_trait>( &'life0 self, params: UpsertSearchOverrideParams, ) -> Pin<Box<dyn Future<Output = Result<SearchOverride, Error<UpsertSearchOverrideError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create or update an override to promote certain documents over others. Using overrides, you can include or exclude specific documents for a given query.

Source§

fn upsert_search_synonym<'life0, 'async_trait>( &'life0 self, params: UpsertSearchSynonymParams, ) -> Pin<Box<dyn Future<Output = Result<SearchSynonym, Error<UpsertSearchSynonymError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create or update a synonym to define search terms that should be considered equivalent.

Source§

fn delete_search_override<'life0, 'async_trait>( &'life0 self, params: DeleteSearchOverrideParams, ) -> Pin<Box<dyn Future<Output = Result<SearchOverride, Error<DeleteSearchOverrideError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_search_synonym<'life0, 'async_trait>( &'life0 self, params: DeleteSearchSynonymParams, ) -> Pin<Box<dyn Future<Output = Result<SearchSynonym, Error<DeleteSearchSynonymError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_search_overrides<'life0, 'async_trait>( &'life0 self, params: GetSearchOverridesParams, ) -> Pin<Box<dyn Future<Output = Result<SearchOverridesResponse, Error<GetSearchOverridesError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_search_synonyms<'life0, 'async_trait>( &'life0 self, params: GetSearchSynonymsParams, ) -> Pin<Box<dyn Future<Output = Result<SearchSynonymsResponse, Error<GetSearchSynonymsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,