Couchbase C++ SDK 1.0.1 (rev. 58d46d7)
Loading...
Searching...
No Matches
search_request Class Reference

A search_request is used to perform operations against the Full Text Search (FTS) Couchbase service. More...

#include <couchbase/search_request.hxx>

Public Member Functions

 search_request (const couchbase::search_query &search_query)
 Create a new search_request with a search_query.
 
 search_request (const couchbase::vector_search &vector_search)
 Create a new search_request with a vector_search.
 
auto search_query (const couchbase::search_query &search_query) -> search_request &
 Used to run a search_query together with an existing vector_search.
 
auto vector_search (const couchbase::vector_search &vector_search) -> search_request &
 Used to run a vector_query together with an existing search_query.
 
std::optional< encoded_search_query > search_query () const
 
std::optional< encoded_search_query > vector_search () const
 
std::optional< vector_search_options::builtvector_options ()
 

Detailed Description

A search_request is used to perform operations against the Full Text Search (FTS) Couchbase service.

It can be used to send an FTS search_query, and/or a vector_search

Since
1.0.0
Committed
Generally available API and should be preferred in production

Constructor & Destructor Documentation

◆ search_request() [1/2]

search_request ( const couchbase::search_query & search_query)
explicit

Create a new search_request with a search_query.

Parameters
search_querythe query to run
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ search_request() [2/2]

search_request ( const couchbase::vector_search & vector_search)
explicit

Create a new search_request with a vector_search.

Parameters
vector_searchthe vector_search to run
Since
1.0.0
Committed
Generally available API and should be preferred in production

Member Function Documentation

◆ search_query() [1/2]

std::optional< encoded_search_query > search_query ( ) const
Returns
encoded representation of the query.
Since
1.0.0
Internal
Internal interface

◆ search_query() [2/2]

auto search_query ( const couchbase::search_query & search_query) -> search_request &

Used to run a search_query together with an existing vector_search.

Note that a maximum of one SearchQuery and one VectorSearch can be provided.

Parameters
search_querythe search_query to run with an existing vector_search.
Returns
this search_request for chaining purposes.
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ vector_options()

std::optional< vector_search_options::built > vector_options ( )
Returns
vector_search_options, if set
Since
1.0.0
Internal
Internal interface

◆ vector_search() [1/2]

std::optional< encoded_search_query > vector_search ( ) const
Returns
encoded representation of the vector search query.
Since
1.0.0
Internal
Internal interface

◆ vector_search() [2/2]

auto vector_search ( const couchbase::vector_search & vector_search) -> search_request &

Used to run a vector_query together with an existing search_query.

Note that a maximum of one SearchQuery and one VectorSearch can be provided.

Parameters
vector_searchthe vector_search to be run with an existing search_query.
Returns
this search_request for chaining purposes.
Since
1.0.0
Committed
Generally available API and should be preferred in production

The documentation for this class was generated from the following file: