VuFind API Documentation

SearchRequestModel
in package

EBSCO EDS API Search Model

Tags
category

EBSCOIndustries

author

Michelle Milton mmilton@epnet.com

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link
https://vufind.org

Table of Contents

$actions  : array<string|int, mixed>
Collection of user actions to apply to current request
$expanders  : array<string|int, mixed>
Expanders to use. Comma separated.
$facetFilters  : array<string|int, mixed>
Array of filters to apply to the search
$facetOperators  : array<string|int, mixed>
Array mapping a facet field to the AND/OR operator to use with it
$highlight  : bool
Whether or not to highlight the search term in the results.
$includeFacets  : string
Whether or not to return facets with the search results. valid values are 'y' or 'n'
$limiters  : array<string|int, mixed>
Options to limit the results by
$pageNumber  : int
Page number of records to return. This is used in conjunction with the {@link $resultsPerPage} to determine the set of records to return.
$query  : array<string|int, mixed>
What to search for, formatted as [{boolean operator},][{field code}:]{term}
$resultsPerPage  : int
Number of records to return
$searchMode  : string
Mode to be effective in the search
$sort  : string
Sort option to apply
$view  : string
Requested level of detail to return the results with
__construct()  : mixed
Constructor
__get()  : mixed
Magic getter
__set()  : SearchRequestModel
Magic setter
addAction()  : void
Add a new action
addExpander()  : void
Add a new expander
addfilter()  : void
Add a new facet filter
addLimiter()  : void
Add a new limiter
addQuery()  : void
Add a new query expression
convertToQueryString()  : string
Converts properties to a querystring to send to the EdsAPI
convertToQueryStringParameterArray()  : string
Converts properties to a querystring to send to the EdsAPI
convertToSearchRequestJSON()  : string
Converts properties to a search request JSON document to send to the EdsAPI
escapeSpecialCharacters()  : string
Escape characters that may be present in the parameter syntax
escapeSpecialCharactersForActions()  : string
Escape characters that may be present in the action parameter syntax
getIndexedParameterName()  : string
Get the querystring parameter name of an indexed parameter to send to the Eds Api
isParameterIndexed()  : bool
Determines whether or not a querystring parameter is indexed
setParameters()  : void
Set properties from parameters
formatDateLimiter()  : string
Format a date limiter

Properties

$actions

Collection of user actions to apply to current request

protected array<string|int, mixed> $actions = []

$expanders

Expanders to use. Comma separated.

protected array<string|int, mixed> $expanders = []

$facetFilters

Array of filters to apply to the search

protected array<string|int, mixed> $facetFilters = []

$facetOperators

Array mapping a facet field to the AND/OR operator to use with it

protected array<string|int, mixed> $facetOperators = []

$highlight

Whether or not to highlight the search term in the results.

protected bool $highlight

$includeFacets

Whether or not to return facets with the search results. valid values are 'y' or 'n'

protected string $includeFacets

$limiters

Options to limit the results by

protected array<string|int, mixed> $limiters = []

$pageNumber

Page number of records to return. This is used in conjunction with the {@link $resultsPerPage} to determine the set of records to return.

protected int $pageNumber

$query

What to search for, formatted as [{boolean operator},][{field code}:]{term}

protected array<string|int, mixed> $query = []

$view

Requested level of detail to return the results with

protected string $view

Methods

__construct()

Constructor

public __construct([array<string|int, mixed> $parameters = [] ]) : mixed

Sets up the EDS API Search Request model

Parameters
$parameters : array<string|int, mixed> = []

parameters to populate request

Return values
mixed

__get()

Magic getter

public __get(string $property) : mixed
Parameters
$property : string

Property to retrieve

Return values
mixed

addAction()

Add a new action

public addAction(string $action) : void
Parameters
$action : string

Action to add to the existing collection of actions

Return values
void

addExpander()

Add a new expander

public addExpander(string $expander) : void
Parameters
$expander : string

Expander to add

Return values
void

addfilter()

Add a new facet filter

public addfilter(string $facetFilter) : void
Parameters
$facetFilter : string

Facet Filter to add

Return values
void

addLimiter()

Add a new limiter

public addLimiter(string $limiter) : void
Parameters
$limiter : string

Limiter to add

Return values
void

addQuery()

Add a new query expression

public addQuery(string $query) : void
Parameters
$query : string

Query expression to add

Return values
void

convertToQueryString()

Converts properties to a querystring to send to the EdsAPI

public convertToQueryString() : string
Return values
string

convertToQueryStringParameterArray()

Converts properties to a querystring to send to the EdsAPI

public convertToQueryStringParameterArray() : string
Return values
string

convertToSearchRequestJSON()

Converts properties to a search request JSON document to send to the EdsAPI

public convertToSearchRequestJSON() : string
Return values
string

escapeSpecialCharacters()

Escape characters that may be present in the parameter syntax

public static escapeSpecialCharacters(string $value) : string
Parameters
$value : string

The value to escape

Return values
string

The value with special characters escaped

escapeSpecialCharactersForActions()

Escape characters that may be present in the action parameter syntax

public static escapeSpecialCharactersForActions(string $value) : string
Parameters
$value : string

The value to escape

Return values
string

The value with special characters escaped

getIndexedParameterName()

Get the querystring parameter name of an indexed parameter to send to the Eds Api

public static getIndexedParameterName(string $value) : string
Parameters
$value : string

Indexed parameter name

Return values
string

isParameterIndexed()

Determines whether or not a querystring parameter is indexed

public static isParameterIndexed(string $value) : bool
Parameters
$value : string

parameter key to check

Return values
bool

setParameters()

Set properties from parameters

public setParameters([array<string|int, mixed> $parameters = [] ]) : void
Parameters
$parameters : array<string|int, mixed> = []

Parameters to set

Return values
void

formatDateLimiter()

Format a date limiter

protected formatDateLimiter(string $filter) : string
Parameters
$filter : string

Filter value

Return values
string

Search results