YAZ  5.23.1
Functions
solr.c File Reference

Implements Solr decoding/encoding. More...

#include <stdlib.h>
#include <assert.h>
#include <yaz/srw.h>
#include <yaz/matchstr.h>
#include <yaz/yaz-iconv.h>
#include <yaz/log.h>
#include <yaz/facet.h>
#include <yaz/wrbuf.h>
#include <yaz/proto.h>
#include "sru-p.h"
#include <libxml/parser.h>
#include <libxml/tree.h>

Go to the source code of this file.

Functions

static void extract_text_node (xmlNodePtr node, WRBUF wrbuf)
 
static int match_xml_node_attribute (xmlNodePtr ptr, const char *node_name, const char *attribute_name, const char *value)
 
static void yaz_solr_decode_result_docs (ODR o, xmlNodePtr ptr, Odr_int start, Z_SRW_searchRetrieveResponse *sr)
 
static int yaz_solr_decode_result (ODR o, xmlNodePtr ptr, Z_SRW_searchRetrieveResponse *sr)
 
static const char * get_facet_term_count (xmlNodePtr node, Odr_int *freq)
 
Z_FacetFieldyaz_solr_decode_facet_field (ODR o, xmlNodePtr ptr, Z_SRW_searchRetrieveResponse *sr)
 
static int yaz_solr_decode_facet_counts (ODR o, xmlNodePtr root, Z_SRW_searchRetrieveResponse *sr)
 
static void yaz_solr_decode_suggestion_values (xmlNodePtr listPptr, WRBUF wrbuf)
 
static void yaz_solr_decode_suggestion_lst (xmlNodePtr lstPtr, WRBUF wrbuf)
 
static void yaz_solr_decode_misspelled (xmlNodePtr lstPtr, WRBUF wrbuf)
 
static int yaz_solr_decode_spellcheck (ODR o, xmlNodePtr spellcheckPtr, Z_SRW_searchRetrieveResponse *sr)
 
static int yaz_solr_decode_scan_result (ODR o, xmlNodePtr ptr, Z_SRW_scanResponse *scr)
 
int yaz_solr_decode_response (ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup)
 decode SOLR response (HTTP) More...
 
static int yaz_solr_encode_facet_field (ODR encode, char **name, char **value, int *i, Z_FacetField *facet_field)
 
static int yaz_solr_encode_facet_list (ODR encode, char **name, char **value, int *i, Z_FacetList *facet_list)
 
int yaz_solr_encode_request (Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu, ODR encode, const char *charset)
 encode SOLR request (HTTP) More...
 

Detailed Description

Implements Solr decoding/encoding.

Definition in file solr.c.

Function Documentation

static void extract_text_node ( xmlNodePtr  node,
WRBUF  wrbuf 
)
static

Definition at line 29 of file solr.c.

References wrbuf_puts().

Referenced by yaz_solr_decode_suggestion_values().

static const char* get_facet_term_count ( xmlNodePtr  node,
Odr_int freq 
)
static
static int match_xml_node_attribute ( xmlNodePtr  ptr,
const char *  node_name,
const char *  attribute_name,
const char *  value 
)
static
static int yaz_solr_decode_facet_counts ( ODR  o,
xmlNodePtr  root,
Z_SRW_searchRetrieveResponse sr 
)
static
Z_FacetField* yaz_solr_decode_facet_field ( ODR  o,
xmlNodePtr  ptr,
Z_SRW_searchRetrieveResponse sr 
)
static void yaz_solr_decode_misspelled ( xmlNodePtr  lstPtr,
WRBUF  wrbuf 
)
static
int yaz_solr_decode_response ( ODR  o,
Z_HTTP_Response hres,
Z_SRW_PDU **  pdup 
)
static int yaz_solr_decode_result ( ODR  o,
xmlNodePtr  ptr,
Z_SRW_searchRetrieveResponse sr 
)
static
static void yaz_solr_decode_result_docs ( ODR  o,
xmlNodePtr  ptr,
Odr_int  start,
Z_SRW_searchRetrieveResponse sr 
)
static
static int yaz_solr_decode_scan_result ( ODR  o,
xmlNodePtr  ptr,
Z_SRW_scanResponse scr 
)
static
static int yaz_solr_decode_spellcheck ( ODR  o,
xmlNodePtr  spellcheckPtr,
Z_SRW_searchRetrieveResponse sr 
)
static
static void yaz_solr_decode_suggestion_lst ( xmlNodePtr  lstPtr,
WRBUF  wrbuf 
)
static
static void yaz_solr_decode_suggestion_values ( xmlNodePtr  listPptr,
WRBUF  wrbuf 
)
static

Definition at line 203 of file solr.c.

References extract_text_node(), match_xml_node_attribute(), node(), and wrbuf_puts().

Referenced by yaz_solr_decode_suggestion_lst().

static int yaz_solr_encode_facet_field ( ODR  encode,
char **  name,
char **  value,
int *  i,
Z_FacetField facet_field 
)
static
static int yaz_solr_encode_facet_list ( ODR  encode,
char **  name,
char **  value,
int *  i,
Z_FacetList facet_list 
)
static

Definition at line 451 of file solr.c.

References Z_FacetList::elements, Z_FacetList::num, and yaz_solr_encode_facet_field().

Referenced by yaz_solr_encode_request().

int yaz_solr_encode_request ( Z_HTTP_Request hreq,
Z_SRW_PDU srw_pdu,
ODR  encode,
const char *  charset 
)