PHP Class SolrSearchRequest, ojs

Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Свойство Type Description
$_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.

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

Constructor
public __construct ( )

addBoostFactor() public méthode

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

addBoostField() public méthode

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

addQueryFieldPhrase() public méthode

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

addQueryFromKeywords() public méthode

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

getBoostFactors() public méthode

Get boost factors.
public getBoostFactors ( ) : array
Résultat array A field -> value -> boost factor assignment

getBoostFields() public méthode

Get boost fields.
public getBoostFields ( ) : array
Résultat array A list of fields containing boost factors to be multiplied with the internal ranking score.

getExcludedIds() public méthode

Get the list of excluded unique IDs.
public getExcludedIds ( ) : array
Résultat array

getFacetCategories() public méthode

For which categories should faceting be enabled?
public getFacetCategories ( ) : array
Résultat array

getFromDate() public méthode

Get the first publication date
public getFromDate ( ) : string
Résultat string

getHighlighting() public méthode

Is highlighting enabled?
public getHighlighting ( ) : boolean
Résultat boolean

getItemsPerPage() public méthode

Get the items per page.
public getItemsPerPage ( ) : integer
Résultat integer

getJournal() public méthode

Get the journal to be queried.
public getJournal ( ) : Journal
Résultat Journal

getOrderBy() public méthode

Get the result ordering criteria
public getOrderBy ( ) : string
Résultat string

getOrderDir() public méthode

Get the result ordering direction
public getOrderDir ( ) : boolean
Résultat boolean

getPage() public méthode

Get the page.
public getPage ( ) : integer
Résultat integer

getQuery() public méthode

Get fieldwise search phrases.
public getQuery ( ) : array
Résultat array A field -> search phrase assignment

getSpellcheck() public méthode

Is spellchecking enabled?
public getSpellcheck ( ) : boolean
Résultat boolean

getToDate() public méthode

Get the last publication date
public getToDate ( ) : string
Résultat string

setBoostFactors() public méthode

Set boost factors.
public setBoostFactors ( $boostFactors )

setBoostFields() public méthode

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

setExcludedIds() public méthode

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

setFacetCategories() public méthode

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

setFromDate() public méthode

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

setHighlighting() public méthode

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

setItemsPerPage() public méthode

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

setJournal() public méthode

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

setOrderBy() public méthode

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

setOrderDir() public méthode

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

setPage() public méthode

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

setQuery() public méthode

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

setSpellcheck() public méthode

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

setToDate() public méthode

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

Property Details

$_boostFactors public_oe property

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

$_boostFields public_oe property

Fields with multiplicative boost values.
public $_boostFields

$_excludedIds public_oe property

An array of unique IDs to exclude.
public $_excludedIds

$_facetCategories public_oe property

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

$_fromDate public_oe property

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

$_highlighting public_oe property

Whether to enable highlighting.
public $_highlighting

$_itemsPerPage public_oe property

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

$_journal public_oe property

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

$_orderBy public_oe property

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

$_orderDir public_oe property

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

$_page public_oe property

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

$_query public_oe property

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

$_spellcheck public_oe property

Whether to enable spell checking.
public $_spellcheck

$_toDate public_oe property

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