YAZ  5.23.1
Typedefs | Functions
solr.h File Reference

Header with public definitions about Solr. More...

#include <stdio.h>
#include <yaz/nmem.h>

Go to the source code of this file.

Typedefs

typedef struct cql_transform_t_solr_transform_t
 SOLR transform handle. The transform describes how to convert from SOLR to PQF (Type-1 AKA RPN). More...
 

Functions

solr_transform_t solr_transform_create (void)
 creates a SOLR transform handle More...
 
solr_transform_t solr_transform_open_FILE (FILE *f)
 creates a SOLR transform handle from am opened file handle More...
 
solr_transform_t solr_transform_open_fname (const char *fname)
 creates a SOLR transform handle from a file More...
 
int solr_transform_define_pattern (solr_transform_t ct, const char *pattern, const char *value)
 defines SOLR transform pattern More...
 
void solr_transform_close (solr_transform_t ct)
 destroys a SOLR transform handle More...
 
int solr_transform_error (solr_transform_t ct, const char **addinfo)
 returns additional information for last transform More...
 
void solr_transform_set_error (solr_transform_t ct, int error, const char *addinfo)
 sets error and addinfo for transform More...
 

Detailed Description

Header with public definitions about Solr.

Definition in file solr.h.

Typedef Documentation

SOLR transform handle. The transform describes how to convert from SOLR to PQF (Type-1 AKA RPN).

Definition at line 42 of file solr.h.

Function Documentation

void solr_transform_close ( solr_transform_t  ct)

destroys a SOLR transform handle

Parameters
ctSOLR transform handle

Definition at line 41 of file solrtransform.c.

References cql_transform_close().

solr_transform_t solr_transform_create ( void  )

creates a SOLR transform handle

Returns
transform handle or NULL for failure

Definition at line 20 of file solrtransform.c.

References cql_transform_create().

int solr_transform_define_pattern ( solr_transform_t  ct,
const char *  pattern,
const char *  value 
)

defines SOLR transform pattern

Parameters
ctSOLR transform handle
patternpattern string
valuepattern value
Returns
0 for succes; -1 for failure

Definition at line 35 of file solrtransform.c.

References cql_transform_define_pattern().

int solr_transform_error ( solr_transform_t  ct,
const char **  addinfo 
)

returns additional information for last transform

Parameters
ctSOLR transform handle
addinfoadditional info (result)
Returns
error code

Definition at line 46 of file solrtransform.c.

References cql_transform_error().

solr_transform_t solr_transform_open_FILE ( FILE *  f)

creates a SOLR transform handle from am opened file handle

Parameters
ffile where transformation spec is read
Returns
transform handle or NULL for failure

The transformation spec is read from a FILE handle which is assumed opened for reading.

Definition at line 25 of file solrtransform.c.

References cql_transform_open_FILE().

solr_transform_t solr_transform_open_fname ( const char *  fname)

creates a SOLR transform handle from a file

Parameters
fnamename of where transformation spec is read
Returns
transform handle or NULL for failure

Definition at line 30 of file solrtransform.c.

References cql_transform_open_fname().

void solr_transform_set_error ( solr_transform_t  ct,
int  error,
const char *  addinfo 
)

sets error and addinfo for transform

Parameters
ctSOLR transform handle
errorerror code
addinfoadditional info

Definition at line 51 of file solrtransform.c.

References cql_transform_set_error().

Referenced by solr_transform_rpn2solr_stream().