WIKINDX API trunk

QSEARCH
in package

QSEARCH common functions used by QUICKSEARCH 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 QUICKSEARCH nor INSERTCITATION, then $fields and $phrase must be populated. $unions can be added to with further SELECT statements.

Table of Contents

Properties

$allIds  : mixed
array
$db  : mixed
object
$metadata  : mixed
object
$parsePhrase  : mixed
object
$stmt  : mixed
object

Methods

abstractUnion()  : string
Create union for the abstract field
creatorUnion()  : string
Create union for the creator field
customLUnion()  : string
Create union for the customL field
customSUnion()  : string
Create union for the customS field
fieldSql()  : mixed
create the unions
getInitialIds()  : mixed
Get the initial IDs from the database
keywordUnion()  : string
Create union for the keyword field
metadataUnion()  : string
Create union for the metadata field
noteUnion()  : string
Create union for the note field
parseWord()  : bool
parse the search word(s)
quicksearchSubQuery()  : mixed
Find ids for NOT, OR and AND segments
setIdQuery()  : mixed
Set the ID query
subtitleUnion()  : string
Create union for the subtitle field
titleUnion()  : string
Create union for the title field
userTagUnion()  : string
Create union for the userTag field

Properties

$allIds

array

private mixed $allIds = []

$metadata

object

private mixed $metadata

$parsePhrase

object

private mixed $parsePhrase

Methods

abstractUnion()

Create union for the abstract field

private abstractUnion(string $search) : string
Parameters
$search : string
Return values
string

creatorUnion()

Create union for the creator field

private creatorUnion(string $search) : string
Parameters
$search : string
Return values
string

customLUnion()

Create union for the customL field

private customLUnion(string $search) : string
Parameters
$search : string
Return values
string

customSUnion()

Create union for the customS field

private customSUnion(string $search) : string
Parameters
$search : string
Return values
string

fieldSql()

create the unions

private fieldSql(mixed $search, mixed $searchFT) : mixed

$this->fields is the default set of fields to search for QUICKSEARCH and INSERTCITATION. Other functions, such as the soundexplorer plugin, can overwrite this public array.

Parameters
$search : mixed
$searchFT : mixed

getInitialIds()

Get the initial IDs from the database

private getInitialIds(mixed $search, mixed $searchFT, mixed $type) : mixed
Parameters
$search : mixed
$searchFT : mixed
$type : mixed

keywordUnion()

Create union for the keyword field

private keywordUnion(string $search) : string
Parameters
$search : string
Return values
string

metadataUnion()

Create union for the metadata field

private metadataUnion(string $search[, string $type = '' ]) : string
Parameters
$search : string
$type : string = ''

Optional 'q', 'p', 'm'

Return values
string

noteUnion()

Create union for the note field

private noteUnion(string $search) : string
Parameters
$search : string
Return values
string

parseWord()

parse the search word(s)

private parseWord() : bool
Return values
bool

quicksearchSubQuery()

Find ids for NOT, OR and AND segments

private quicksearchSubQuery(mixed $idQuery, false|string $type) : mixed
Parameters
$idQuery : mixed
$type : false|string

(default FALSE) otherwise 'or', 'and', 'not', 'final'

setIdQuery()

Set the ID query

private setIdQuery() : mixed

subtitleUnion()

Create union for the subtitle field

private subtitleUnion(string $search) : string
Parameters
$search : string
Return values
string

titleUnion()

Create union for the title field

private titleUnion(string $search) : string
Parameters
$search : string
Return values
string

userTagUnion()

Create union for the userTag field

private userTagUnion(string $search) : string
Parameters
$search : string
Return values
string

        
On this page

Search results