YAZ  5.25.0
facet.c File Reference

Facet utilities. More...

#include <yaz/facet.h>
#include <yaz/diagbib1.h>
#include <yaz/oid_db.h>
#include <yaz/oid_std.h>
#include <yaz/otherinfo.h>
#include <yaz/pquery.h>
#include <assert.h>

Go to the source code of this file.


void yaz_oi_set_facetlist (Z_OtherInformation **otherInformation, ODR odr, Z_FacetList *facet_list)
Z_FacetListyaz_oi_get_facetlist (Z_OtherInformation **otherInformation)
void yaz_facet_attr_init (struct yaz_facet_attr *attr_values)
static const char * stringattr (Z_ComplexAttribute *c)
static void useattr (Z_AttributeElement *ae, struct yaz_facet_attr *av)
static void numattr (Z_AttributeElement *ae, struct yaz_facet_attr *av, int *v)
void yaz_facet_attr_get_z_attributes (const Z_AttributeList *attributes, struct yaz_facet_attr *av)
Z_FacetTermfacet_term_create_cstr (ODR odr, const char *cstr, Odr_int freq)
Z_FacetFieldfacet_field_create (ODR odr, Z_AttributeList *attributes, int num_terms)
void facet_field_term_set (ODR odr, Z_FacetField *field, Z_FacetTerm *facet_term, int index)
Z_FacetListfacet_list_create (ODR odr, int num_facets)
void facet_list_field_set (ODR odr, Z_FacetList *list, Z_FacetField *field, int index)

Detailed Description

Facet utilities.

Definition in file facet.c.

Function Documentation

◆ facet_field_create()

Z_FacetField* facet_field_create ( ODR  odr,
Z_AttributeList attributes,
int  num_terms 

◆ facet_field_term_set()

void facet_field_term_set ( ODR  odr,
Z_FacetField field,
Z_FacetTerm facet_term,
int  index 

Definition at line 208 of file facet.c.

References Z_FacetField::terms.

Referenced by addterms(), yaz_solr_decode_facet_field(), and yaz_sru_proxy_decode_facet_field().

◆ facet_list_create()

Z_FacetList* facet_list_create ( ODR  odr,
int  num_facets 

◆ facet_list_field_set()

void facet_list_field_set ( ODR  odr,
Z_FacetList list,
Z_FacetField field,
int  index 

Definition at line 224 of file facet.c.

References Z_FacetList::elements.

Referenced by yaz_solr_decode_facet_counts(), and yaz_sru_proxy_decode_facets().

◆ facet_term_create_cstr()

Z_FacetTerm* facet_term_create_cstr ( ODR  odr,
const char *  cstr,
Odr_int  freq 

◆ numattr()

static void numattr ( Z_AttributeElement ae,
struct yaz_facet_attr av,
int *  v 

◆ stringattr()

static const char* stringattr ( Z_ComplexAttribute c)

◆ useattr()

static void useattr ( Z_AttributeElement ae,
struct yaz_facet_attr av 

◆ yaz_facet_attr_get_z_attributes()

void yaz_facet_attr_get_z_attributes ( const Z_AttributeList attributes,
struct yaz_facet_attr av 

◆ yaz_facet_attr_init()

void yaz_facet_attr_init ( struct yaz_facet_attr attr_values)

◆ yaz_oi_get_facetlist()

Z_FacetList* yaz_oi_get_facetlist ( Z_OtherInformation **  otherInformation)

◆ yaz_oi_set_facetlist()

void yaz_oi_set_facetlist ( Z_OtherInformation **  otherInformation,
ODR  odr,
Z_FacetList facet_list