PHP Класс SolrSearchRequest, ojs

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_boostFactors A field->value->boost factor assignment.
$_boostFields Fields with multiplicative boost values.
$_excludedIds An array of unique IDs to exclude.
$_facetCategories Enabled facet categories (none by default).
$_fromDate Timestamp representing the first publication date to be included in the result set. Null means: No limitation.
$_highlighting Whether to enable highlighting.
$_itemsPerPage For paginated queries: The items per page.
$_journal The journal to be queried. All journals of an OJS instance will be queried if no journal is given.
$_orderBy Result set ordering. Can be any index field or the pseudo- field "score" for ordering by relevance.
$_orderDir Result set ordering direction. Can be 'true' for ascending or 'false' for descending order.
$_page For paginated queries: The page to be returned.
$_query A field->search phrase assignment defining fieldwise search phrases.
$_spellcheck Whether to enable spell checking.
$_toDate Timestamp representing the last publication date to be included in the result set. Null means: No limitation.

Открытые методы

Метод Описание
__construct ( ) Constructor
addBoostFactor ( $field, $value, $boostFactor ) Set the boost factor for a field/value combination.
addBoostField ( $field ) A field containing boost factors to be multiplied.
addQueryFieldPhrase ( $field, $searchPhrase ) Set the search phrase for a field.
addQueryFromKeywords ( $keywords ) Configure the search request from a keywords array as required by SubmissionSearch::retrieveResults()
getBoostFactors ( ) : array Get boost factors.
getBoostFields ( ) : array Get boost fields.
getExcludedIds ( ) : array Get the list of excluded unique IDs.
getFacetCategories ( ) : array For which categories should faceting be enabled?
getFromDate ( ) : string Get the first publication date
getHighlighting ( ) : boolean Is highlighting enabled?
getItemsPerPage ( ) : integer Get the items per page.
getJournal ( ) : Journal Get the journal to be queried.
getOrderBy ( ) : string Get the result ordering criteria
getOrderDir ( ) : boolean Get the result ordering direction
getPage ( ) : integer Get the page.
getQuery ( ) : array Get fieldwise search phrases.
getSpellcheck ( ) : boolean Is spellchecking enabled?
getToDate ( ) : string Get the last publication date
setBoostFactors ( $boostFactors ) Set boost factors.
setBoostFields ( $boostFields ) Set boost fields.
setExcludedIds ( $excludedIds ) Set a list of unique IDs to exclude from the search result.
setFacetCategories ( $facetCategories ) Set the categories for which faceting should be enabled.
setFromDate ( $fromDate ) Set the first publication date
setHighlighting ( $highlighting ) Set whether highlighting should be enabled.
setItemsPerPage ( $itemsPerPage ) Set the items per page
setJournal ( &$journal ) Set the journal to be queried
setOrderBy ( $orderBy ) Set the result ordering criteria
setOrderDir ( $orderDir ) Set the result ordering direction
setPage ( $page ) Set the page
setQuery ( $query ) Set fieldwise search phrases.
setSpellcheck ( $spellcheck ) Set whether spellchecking should be enabled.
setToDate ( $toDate ) Set the last publication date

Описание методов

__construct() публичный Метод

Constructor
public __construct ( )

addBoostFactor() публичный Метод

Set the boost factor for a field/value combination.
public addBoostFactor ( $field, $value, $boostFactor )
$field string
$value string
$boostFactor float

addBoostField() публичный Метод

with the internal ranking score.
public addBoostField ( $field )
$field string

addQueryFieldPhrase() публичный Метод

Set the search phrase for a field.
public addQueryFieldPhrase ( $field, $searchPhrase )
$field string
$searchPhrase string

addQueryFromKeywords() публичный Метод

Configure the search request from a keywords array as required by SubmissionSearch::retrieveResults()
public addQueryFromKeywords ( $keywords )
$keywords array See SubmissionSearch::retrieveResults()

getBoostFactors() публичный Метод

Get boost factors.
public getBoostFactors ( ) : array
Результат array A field -> value -> boost factor assignment

getBoostFields() публичный Метод

Get boost fields.
public getBoostFields ( ) : array
Результат array A list of fields containing boost factors to be multiplied with the internal ranking score.

getExcludedIds() публичный Метод

Get the list of excluded unique IDs.
public getExcludedIds ( ) : array
Результат array

getFacetCategories() публичный Метод

For which categories should faceting be enabled?
public getFacetCategories ( ) : array
Результат array

getFromDate() публичный Метод

Get the first publication date
public getFromDate ( ) : string
Результат string

getHighlighting() публичный Метод

Is highlighting enabled?
public getHighlighting ( ) : boolean
Результат boolean

getItemsPerPage() публичный Метод

Get the items per page.
public getItemsPerPage ( ) : integer
Результат integer

getJournal() публичный Метод

Get the journal to be queried.
public getJournal ( ) : Journal
Результат Journal

getOrderBy() публичный Метод

Get the result ordering criteria
public getOrderBy ( ) : string
Результат string

getOrderDir() публичный Метод

Get the result ordering direction
public getOrderDir ( ) : boolean
Результат boolean

getPage() публичный Метод

Get the page.
public getPage ( ) : integer
Результат integer

getQuery() публичный Метод

Get fieldwise search phrases.
public getQuery ( ) : array
Результат array A field -> search phrase assignment

getSpellcheck() публичный Метод

Is spellchecking enabled?
public getSpellcheck ( ) : boolean
Результат boolean

getToDate() публичный Метод

Get the last publication date
public getToDate ( ) : string
Результат string

setBoostFactors() публичный Метод

Set boost factors.
public setBoostFactors ( $boostFactors )

setBoostFields() публичный Метод

Set boost fields.
public setBoostFields ( $boostFields )
$boostFields array A list of fields containing boost factors to be multiplied with the internal ranking score.

setExcludedIds() публичный Метод

Set a list of unique IDs to exclude from the search result.
public setExcludedIds ( $excludedIds )
$excludedIds array

setFacetCategories() публичный Метод

Set the categories for which faceting should be enabled.
public setFacetCategories ( $facetCategories )
$facetCategories boolean

setFromDate() публичный Метод

Set the first publication date
public setFromDate ( $fromDate )
$fromDate string

setHighlighting() публичный Метод

Set whether highlighting should be enabled.
public setHighlighting ( $highlighting )
$highlighting boolean

setItemsPerPage() публичный Метод

Set the items per page
public setItemsPerPage ( $itemsPerPage )
$itemsPerPage integer

setJournal() публичный Метод

Set the journal to be queried
public setJournal ( &$journal )
$journal Journal

setOrderBy() публичный Метод

Set the result ordering criteria
public setOrderBy ( $orderBy )
$orderBy string

setOrderDir() публичный Метод

Set the result ordering direction
public setOrderDir ( $orderDir )
$orderDir boolean

setPage() публичный Метод

Set the page
public setPage ( $page )
$page integer

setQuery() публичный Метод

Set fieldwise search phrases.
public setQuery ( $query )
$query array A field -> search phrase assignment

setSpellcheck() публичный Метод

Set whether spellchecking should be enabled.
public setSpellcheck ( $spellcheck )
$spellcheck boolean

setToDate() публичный Метод

Set the last publication date
public setToDate ( $toDate )
$toDate string

Описание свойств

$_boostFactors публичное свойство

A field->value->boost factor assignment.
public $_boostFactors

$_boostFields публичное свойство

Fields with multiplicative boost values.
public $_boostFields

$_excludedIds публичное свойство

An array of unique IDs to exclude.
public $_excludedIds

$_facetCategories публичное свойство

Enabled facet categories (none by default).
public $_facetCategories

$_fromDate публичное свойство

Timestamp representing the first publication date to be included in the result set. Null means: No limitation.
public $_fromDate

$_highlighting публичное свойство

Whether to enable highlighting.
public $_highlighting

$_itemsPerPage публичное свойство

For paginated queries: The items per page.
public $_itemsPerPage

$_journal публичное свойство

The journal to be queried. All journals of an OJS instance will be queried if no journal is given.
public $_journal

$_orderBy публичное свойство

Result set ordering. Can be any index field or the pseudo- field "score" for ordering by relevance.
public $_orderBy

$_orderDir публичное свойство

Result set ordering direction. Can be 'true' for ascending or 'false' for descending order.
public $_orderDir

$_page публичное свойство

For paginated queries: The page to be returned.
public $_page

$_query публичное свойство

A field->search phrase assignment defining fieldwise search phrases.
public $_query

$_spellcheck публичное свойство

Whether to enable spell checking.
public $_spellcheck

$_toDate публичное свойство

Timestamp representing the last publication date to be included in the result set. Null means: No limitation.
public $_toDate