Search for strings in documents and more.
|
lcb_STATUS | lcb_respsearch_status (const lcb_RESPSEARCH *resp) |
|
lcb_STATUS | lcb_respsearch_cookie (const lcb_RESPSEARCH *resp, void **cookie) |
|
lcb_STATUS | lcb_respsearch_row (const lcb_RESPSEARCH *resp, const char **row, size_t *row_len) |
|
lcb_STATUS | lcb_respsearch_http_response (const lcb_RESPSEARCH *resp, const lcb_RESPHTTP **http) |
|
lcb_STATUS | lcb_respsearch_handle (const lcb_RESPSEARCH *resp, lcb_SEARCH_HANDLE **handle) |
| Get search handle from search response.
|
|
lcb_STATUS | lcb_respsearch_error_context (const lcb_RESPSEARCH *resp, const lcb_SEARCH_ERROR_CONTEXT **ctx) |
|
int | lcb_respsearch_is_final (const lcb_RESPSEARCH *resp) |
|
lcb_STATUS | lcb_cmdsearch_create (lcb_CMDSEARCH **cmd) |
|
lcb_STATUS | lcb_cmdsearch_destroy (lcb_CMDSEARCH *cmd) |
|
lcb_STATUS | lcb_cmdsearch_callback (lcb_CMDSEARCH *cmd, lcb_SEARCH_CALLBACK callback) |
|
lcb_STATUS | lcb_cmdsearch_payload (lcb_CMDSEARCH *cmd, const char *payload, size_t payload_len) |
|
lcb_STATUS | lcb_cmdsearch_handle (lcb_CMDSEARCH *cmd, lcb_SEARCH_HANDLE **handle) |
| Obtain handle to search.
|
|
lcb_STATUS | lcb_cmdsearch_timeout (lcb_CMDSEARCH *cmd, uint32_t timeout) |
|
lcb_STATUS | lcb_cmdsearch_on_behalf_of (lcb_CMDSEARCH *cmd, const char *data, size_t data_len) |
|
lcb_STATUS | lcb_search (lcb_INSTANCE *instance, void *cookie, const lcb_CMDSEARCH *cmd) |
| Issue a full-text query.
|
|
lcb_STATUS | lcb_search_cancel (lcb_INSTANCE *instance, lcb_SEARCH_HANDLE *handle) |
| Cancel a full-text query in progress.
|
|
|
typedef struct lcb_SEARCH_HANDLE_ | lcb_SEARCH_HANDLE |
|
typedef struct lcb_RESPSEARCH_ | lcb_RESPSEARCH |
|
typedef struct lcb_CMDSEARCH_ | lcb_CMDSEARCH |
|
typedef void(* | lcb_SEARCH_CALLBACK) (lcb_INSTANCE *, int, const lcb_RESPSEARCH *) |
|
◆ 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
-
resp | the search response |
handle | pointer 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
-
cmd | the command |
handle | pointer 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()
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
-
instance | the instance |
cookie | opaque user cookie to be set in the response object |
cmd | command containing the query and callback |
- Returns
- LCB_SUCCESS if successfully scheduled, otherwise an error.
- Examples
- example/fts/fts.c.
◆ lcb_search_cancel()
Cancel a full-text query in progress.
The handle is usually obtained via the lcb_cmdsearch_handle call
- Parameters
-
- Returns
- LCB_SUCCESS if successful, otherwise an error.