Couchbase C Client  3.3.14
Asynchronous C Client for Couchbase
Full Text Search

Detailed Description

Search for strings in documents and more

Function Documentation

◆ lcb_respsearch_handle()

lcb_STATUS lcb_respsearch_handle ( const lcb_RESPSEARCH * resp,
lcb_SEARCH_HANDLE ** handle )

Get search handle from search response.

Used to cancel a request. See lcb_cmdsearch_handle as well

Parameters
respthe search response
handlepointer to handle pointer
Returns
LCB_SUCCESS if successful, otherwise an error code

◆ lcb_cmdsearch_handle()

lcb_STATUS lcb_cmdsearch_handle ( lcb_CMDSEARCH * cmd,
lcb_SEARCH_HANDLE ** handle )

Obtain handle to search.

Used to cancel a query. See lcb_respsearch_handle as well

Parameters
cmdthe command
handlepointer to handle pointer
Returns
LCB_SUCCESS upon success, otherwise an error code

◆ lcb_cmdsearch_on_behalf_of()

lcb_STATUS lcb_cmdsearch_on_behalf_of ( lcb_CMDSEARCH * cmd,
const char * data,
size_t data_len )
Stability
Internal
Internal: This should never be used and is not supported.

◆ lcb_search()

lcb_STATUS lcb_search ( lcb_INSTANCE * instance,
void * cookie,
const lcb_CMDSEARCH * cmd )

Issue a full-text query.

The callback (lcb_SEARCH_CALLBACK) will be invoked for each hit. It will then be invoked one last time with the result metadata (including any facets) and the lcb_resp_is_final will return true.

Parameters
instancethe instance
cookieopaque user cookie to be set in the response object
cmdcommand containing the query and callback
Returns
LCB_SUCCESS if successfully scheduled, otherwise an error.
Examples
example/fts/fts.c.

◆ lcb_search_cancel()

lcb_STATUS lcb_search_cancel ( lcb_INSTANCE * instance,
lcb_SEARCH_HANDLE * handle )

Cancel a full-text query in progress.

The handle is usually obtained via the lcb_cmdsearch_handle call

Parameters
instancethe instance
handlethe handle to the search. See lcb_cmdsearch_handle.
Returns
LCB_SUCCESS if successful, otherwise an error.