YAZ  5.34.0
Functions
zoom-sru.c File Reference

Implements ZOOM SRU. More...

#include <assert.h>
#include <string.h>
#include <errno.h>
#include "zoom-p.h"
#include <yaz/log.h>
#include <yaz/pquery.h>

Go to the source code of this file.

Functions

static void set_SRU_error (ZOOM_connection c, Z_SRW_diagnostic *d)
 
static zoom_ret send_srw (ZOOM_connection c, Z_SRW_PDU *sr)
 
static Z_SRW_PDUZOOM_srw_get_pdu (ZOOM_connection c, int type)
 
zoom_ret ZOOM_connection_srw_send_scan (ZOOM_connection c)
 
zoom_ret ZOOM_connection_srw_send_search (ZOOM_connection c)
 
static zoom_ret handle_srw_response (ZOOM_connection c, Z_SRW_searchRetrieveResponse *res)
 
static zoom_ret handle_srw_scan_response (ZOOM_connection c, Z_SRW_scanResponse *res)
 
int ZOOM_handle_sru (ZOOM_connection c, Z_HTTP_Response *hres, zoom_ret *cret, char **addinfo)
 

Detailed Description

Implements ZOOM SRU.

Definition in file zoom-sru.c.

Function Documentation

◆ handle_srw_response()

static zoom_ret handle_srw_response ( ZOOM_connection  c,
Z_SRW_searchRetrieveResponse res 
)
static

Definition at line 252 of file zoom-sru.c.

References Z_OtherInformationUnit::category, Z_NamePlusRecord::databaseName, Z_NamePlusRecord::databaseRecord, Z_External::descriptor, Z_SRW_searchRetrieveResponse::diagnostics, Z_External::direct_reference, Z_OtherInformationUnit::externallyDefinedInfo, Z_External::facetList, Z_SRW_searchRetrieveResponse::facetList, Z_External::indirect_reference, Z_OtherInformationUnit::information, Z_OtherInformation::list, ZOOM_resultset_p::live_set, ZOOM_connection_p::log_details, nmem_destroy(), nmem_transfer(), Z_SRW_searchRetrieveResponse::num_diagnostics, Z_OtherInformation::num_elements, Z_SRW_searchRetrieveResponse::num_records, Z_SRW_searchRetrieveResponse::numberOfRecords, Z_External::octet_aligned, ZOOM_resultset_p::odr, odr_create_Odr_oct(), odr_extract_mem(), odr_getmem, ZOOM_connection_p::odr_in, odr_malloc(), odr_oiddup(), Z_SRW_record::recordData_buf, Z_SRW_record::recordData_len, Z_SRW_record::recordPosition, Z_SRW_searchRetrieveResponse::records, Z_SRW_record::recordSchema, Z_SRW_searchRetrieveResponse::resultCountPrecision, Z_SRW_searchRetrieveResponse::resultSetId, ZOOM_task_p::search, set_SRU_error(), ZOOM_resultset_p::size, sru_decode_surrogate_diagnostics(), Z_SRW_searchRetrieveResponse::suggestions, ZOOM_connection_p::tasks, Z_External::u, Z_NamePlusRecord::u, ZOOM_task_p::u, Z_External::which, Z_NamePlusRecord::which, Z_OtherInformationUnit::which, ZOOM_task_p::which, yaz_log(), yaz_oid_recsyn_xml, yaz_oid_userinfo_facet_1, Z_External_octet, Z_External_userFacets, Z_NamePlusRecord_databaseRecord, Z_OtherInfo_externallyDefinedInfo, zoom_complete, ZOOM_connection_put_event(), ZOOM_connection_srw_send_search(), ZOOM_Event_create(), ZOOM_EVENT_RECV_SEARCH, ZOOM_handle_facet_list(), ZOOM_memcached_hitcount(), ZOOM_record_cache_add(), ZOOM_record_cache_lookup(), ZOOM_resultset_option_set(), and ZOOM_TASK_SEARCH.

Referenced by ZOOM_handle_sru().

◆ handle_srw_scan_response()

static zoom_ret handle_srw_scan_response ( ZOOM_connection  c,
Z_SRW_scanResponse res 
)
static

◆ send_srw()

static zoom_ret send_srw ( ZOOM_connection  c,
Z_SRW_PDU sr 
)
static

◆ set_SRU_error()

static void set_SRU_error ( ZOOM_connection  c,
Z_SRW_diagnostic d 
)
static

◆ ZOOM_connection_srw_send_scan()

zoom_ret ZOOM_connection_srw_send_scan ( ZOOM_connection  c)

◆ ZOOM_connection_srw_send_search()

zoom_ret ZOOM_connection_srw_send_search ( ZOOM_connection  c)

Definition at line 145 of file zoom-sru.c.

References Z_External::cql, ZOOM_connection_p::error, Z_SRW_searchRetrieveRequest::facetList, ZOOM_resultset_p::live_set, Z_SRW_searchRetrieveRequest::maximumRecords, ZOOM_resultset_p::odr, odr_intdup(), ZOOM_connection_p::odr_out, odr_strdup(), odr_strdup_null(), ZOOM_resultset_p::options, Z_SRW_searchRetrieveRequest::query, ZOOM_resultset_p::query, Z_SRW_searchRetrieveRequest::queryType, Z_SRW_searchRetrieveRequest::recordPacking, Z_SRW_searchRetrieveRequest::recordSchema, ZOOM_resultset_p::req_facets, Z_SRW_PDU::request, ZOOM_task_p::search, send_srw(), ZOOM_resultset_p::setname, ZOOM_resultset_p::size, Z_SRW_searchRetrieveRequest::sort, Z_SRW_searchRetrieveRequest::sort_type, Z_SRW_searchRetrieveRequest::sortKeys, Z_SRW_searchRetrieveRequest::startRecord, ZOOM_resultset_p::step, ZOOM_connection_p::tasks, Z_Query::type_1, Z_Query::type_104, Z_External::u, Z_SRW_PDU::u, Z_Query::u, ZOOM_task_p::u, Z_External::which, Z_Query::which, ZOOM_task_p::which, yaz_encode_sru_extra(), yaz_pqf_parse_facet_list(), Z_External_CQL, Z_Query_type_1, Z_Query_type_104, Z_SRW_searchRetrieve_request, Z_SRW_sort_type_sort, zoom_complete, ZOOM_ERROR_UNSUPPORTED_QUERY, ZOOM_memcached_search(), ZOOM_options_set(), ZOOM_query_get_query_string(), ZOOM_query_get_sru11(), ZOOM_query_get_Z_Query(), ZOOM_record_cache_lookup(), ZOOM_resultset_option_get(), ZOOM_set_error(), ZOOM_srw_get_pdu(), and ZOOM_TASK_SEARCH.

Referenced by handle_srw_response(), and ZOOM_connection_exec_task().

◆ ZOOM_handle_sru()

int ZOOM_handle_sru ( ZOOM_connection  c,
Z_HTTP_Response hres,
zoom_ret cret,
char **  addinfo 
)

◆ ZOOM_srw_get_pdu()

static Z_SRW_PDU* ZOOM_srw_get_pdu ( ZOOM_connection  c,
int  type 
)
static