Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
SolrSearchRequest Class Reference

Public Member Functions

 addBoostFactor ($field, $value, $boostFactor)
 
 addQueryFieldPhrase ($field, $searchPhrase)
 
 addQueryFromKeywords ($keywords)
 
 getBoostFactors ()
 
 getFacetCategories ()
 
 getFromDate ()
 
 getHighlighting ()
 
 getItemsPerPage ()
 
getJournal ()
 
 getOrderBy ()
 
 getOrderDir ()
 
 getPage ()
 
 getQuery ()
 
 getSpellcheck ()
 
 getToDate ()
 
 setBoostFactors ($boostFactors)
 
 setFacetCategories ($facetCategories)
 
 setFromDate ($fromDate)
 
 setHighlighting ($highlighting)
 
 setItemsPerPage ($itemsPerPage)
 
 setJournal (&$journal)
 
 setOrderBy ($orderBy)
 
 setOrderDir ($orderDir)
 
 setPage ($page)
 
 setQuery ($query)
 
 setSpellcheck ($spellcheck)
 
 setToDate ($toDate)
 
 SolrSearchRequest ()
 

Detailed Description

A value object containing all parameters of a solr search query.

Definition at line 16 of file SolrSearchRequest.inc.php.

Member Function Documentation

SolrSearchRequest::addBoostFactor (   $field,
  $value,
  $boostFactor 
)

Set the boost factor for a field/value combination.

Parameters
$fieldstring
$valuestring
$boostFactorfloat

Definition at line 311 of file SolrSearchRequest.inc.php.

SolrSearchRequest::addQueryFieldPhrase (   $field,
  $searchPhrase 
)

Set the search phrase for a field.

Parameters
$fieldstring
$searchPhrasestring

Definition at line 135 of file SolrSearchRequest.inc.php.

Referenced by addQueryFromKeywords().

SolrSearchRequest::addQueryFromKeywords (   $keywords)

Configure the search request from a keywords array as required by ArticleSearch::retrieveResults()

Parameters
$keywordsarray See ArticleSearch::retrieveResults()

Definition at line 336 of file SolrSearchRequest.inc.php.

References addQueryFieldPhrase().

SolrSearchRequest::getBoostFactors ( )

Get boost factors.

Returns
array A field -> value -> boost factor assignment

Definition at line 293 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getFacetCategories ( )

For which categories should faceting be enabled?

Returns
array

Definition at line 276 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getFromDate ( )

Get the first publication date

Returns
string

Definition at line 179 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getHighlighting ( )

Is highlighting enabled?

Returns
boolean

Definition at line 259 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getItemsPerPage ( )

Get the items per page.

Returns
integer

Definition at line 163 of file SolrSearchRequest.inc.php.

& SolrSearchRequest::getJournal ( )

Get the journal to be queried.

Returns
Journal

Definition at line 102 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getOrderBy ( )

Get the result ordering criteria

Returns
string

Definition at line 211 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getOrderDir ( )

Get the result ordering direction

Returns
boolean

Definition at line 227 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getPage ( )

Get the page.

Returns
integer

Definition at line 145 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getQuery ( )

Get fieldwise search phrases.

Returns
array A field -> search phrase assignment

Definition at line 118 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getSpellcheck ( )

Is spellchecking enabled?

Returns
boolean

Definition at line 243 of file SolrSearchRequest.inc.php.

SolrSearchRequest::getToDate ( )

Get the last publication date

Returns
string

Definition at line 195 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setBoostFactors (   $boostFactors)

Set boost factors.

Parameters
$boostQueryarray A field -> value -> boost factor assignment

Definition at line 301 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setFacetCategories (   $facetCategories)

Set the categories for which faceting should be enabled.

Parameters
$facetCategoriesboolean

Definition at line 285 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setFromDate (   $fromDate)

Set the first publication date

Parameters
$fromDatestring

Definition at line 187 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setHighlighting (   $highlighting)

Set whether highlighting should be enabled.

Parameters
$highlightingboolean

Definition at line 267 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setItemsPerPage (   $itemsPerPage)

Set the items per page

Parameters
$itemsPerPageinteger

Definition at line 171 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setJournal ( $journal)

Set the journal to be queried

Parameters
$journalJournal

Definition at line 110 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setOrderBy (   $orderBy)

Set the result ordering criteria

Parameters
$orderBystring

Definition at line 219 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setOrderDir (   $orderDir)

Set the result ordering direction

Parameters
$orderDirboolean

Definition at line 235 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setPage (   $page)

Set the page

Parameters
$pageinteger

Definition at line 153 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setQuery (   $query)

Set fieldwise search phrases.

Parameters
$queryarray A field -> search phrase assignment

Definition at line 126 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setSpellcheck (   $spellcheck)

Set whether spellchecking should be enabled.

Parameters
$spellcheckboolean

Definition at line 251 of file SolrSearchRequest.inc.php.

SolrSearchRequest::setToDate (   $toDate)

Set the last publication date

Parameters
$toDatestring

Definition at line 203 of file SolrSearchRequest.inc.php.

SolrSearchRequest::SolrSearchRequest ( )

Constructor

Parameters
$searchHandlerstring The search handler URL. We assume the embedded server as a default.

Definition at line 90 of file SolrSearchRequest.inc.php.


The documentation for this class was generated from the following file: