SEARCHCOMMON
in package
Common functions used by QSEARCH and ASEARCH but also by, for example, INSERTCITATION and the soundExplorer plugin
The gateway is getIds(). Thus, the function of this class is to return resource ids that match the words in a complex search phrase.
If the search is from neither ASEARCH, QSEARCH, nor INSERTCITATION, then $fields and $phrase must be populated. $unions can be added to with further SELECT statements.
If the search is advanced search, arrays such as $this->parsePhrase->ands are multidimensionsal. Otherwise, they are single dimension arrays.
Table of Contents
Properties
- $asearchInput : mixed
- array
- $phrase : mixed
- string
- $qsearchFields : mixed
- array
- $searchType : mixed
- string
Methods
- __construct() : mixed
- SEARCHCOMMON
- dbFieldsAsearch() : array<string|int, mixed>
- relationships of advanced search fields to database fields and tables (used when search is submitted and natural language testing)
- getIds() : mixed
- Get the list of resource ids
- optionsFilter() : bool
- Filter according to DOI, URL, peer review, attachments, etc.
- quarantine() : string
- Select statement for quarantined resources.
- useBibsFilter() : bool
- Select statement for filtering by user bibliographies
Properties
$asearchInput
array
public
mixed
$asearchInput
= []
$phrase
string
public
mixed
$phrase
= \FALSE
$qsearchFields
array
public
mixed
$qsearchFields
= [
// Keep public for e.g. sound explore plugin
'title',
'subtitle',
'creator',
'keyword',
'metadata',
'userTag',
'customL',
'abstract',
'note',
]
$searchType
string
public
mixed
$searchType
= 'qsearch'
Methods
__construct()
SEARCHCOMMON
public
__construct() : mixed
dbFieldsAsearch()
relationships of advanced search fields to database fields and tables (used when search is submitted and natural language testing)
public
dbFieldsAsearch() : array<string|int, mixed>
Return values
array<string|int, mixed>getIds()
Get the list of resource ids
public
getIds() : mixed
optionsFilter()
Filter according to DOI, URL, peer review, attachments, etc.
public
optionsFilter(array<string|int, mixed> &$cte) : bool
Parameters
- $cte : array<string|int, mixed>
Return values
boolquarantine()
Select statement for quarantined resources.
public
quarantine() : string
Return values
stringuseBibsFilter()
Select statement for filtering by user bibliographies
public
useBibsFilter(array<string|int, mixed> &$cte) : bool
Parameters
- $cte : array<string|int, mixed>