class ApachesolrViewsSolrBaseQuery in Apache Solr Views 7
@file Contains custom SolrBaseQuery class for Apachesolr Views.
Hierarchy
- class \SolrFilterSubQuery
- class \SolrBaseQuery implements DrupalSolrQueryInterface
- class \ApachesolrViewsSolrBaseQuery
- class \SolrBaseQuery implements DrupalSolrQueryInterface
Expanded class hierarchy of ApachesolrViewsSolrBaseQuery
File
- ./
apachesolr_views_solr_base_query.inc, line 8 - Contains custom SolrBaseQuery class for Apachesolr Views.
View source
class ApachesolrViewsSolrBaseQuery extends SolrBaseQuery {
// The view related with this query object.
protected $view;
/**
* Constructs a new archiver instance.
*
* @param string $name
* The search name, used for finding the correct blocks and other config.
* Typically "apachesolr".
*
* @param string $solr
* An instantiated DrupalApacheSolrService Object.
* Can be instantiated from apachesolr_get_solr().
*
* @param array $params
* Array of params to initialize the object (typically 'q' and 'fq').
*
* @param string $sortstring
* Visible string telling solr how to sort - added to GET query params.
*
* @param string $base_path
* The search base path (without the keywords) for this query,
* without trailing slash.
*
* @param array $context
* The context related with this query.
*
* @param object $view
* The view object related with this query.
*/
public function __construct($name, $solr, array $params = array(), $sortstring = '', $base_path = '', $context = array(), $view = NULL) {
parent::__construct($name, $solr, $params, $sortstring, $base_path, $context);
$this->view = $view;
}
/**
* Need to set proper base path for facets.
*/
public function getPath($new_keywords = NULL) {
if (isset($new_keywords)) {
return $this->base_path . '/' . $new_keywords;
}
return $this->base_path;
}
/**
* Returns the view related with this query object.
*/
public function getView() {
return $this->view;
}
/**
* Override method, so views sorts do not become overriden randomly.
*/
protected function parseSortString() {
// Do nothing.
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ApachesolrViewsSolrBaseQuery:: |
protected | property | ||
ApachesolrViewsSolrBaseQuery:: |
public | function |
Need to set proper base path for facets. Overrides SolrBaseQuery:: |
|
ApachesolrViewsSolrBaseQuery:: |
public | function | Returns the view related with this query object. | |
ApachesolrViewsSolrBaseQuery:: |
protected | function |
Override method, so views sorts do not become overriden randomly. Overrides SolrBaseQuery:: |
|
ApachesolrViewsSolrBaseQuery:: |
public | function |
Constructs a new archiver instance. Overrides SolrBaseQuery:: |
|
SolrBaseQuery:: |
public | property | ||
SolrBaseQuery:: |
protected | property | ||
SolrBaseQuery:: |
protected | property | The search base path. | |
SolrBaseQuery:: |
protected | property | ||
SolrBaseQuery:: |
protected | property | ||
SolrBaseQuery:: |
protected | property | The query name is used to construct a searcher string. Mostly the environment id | |
SolrBaseQuery:: |
public | property | ||
SolrBaseQuery:: |
protected | property | The parameters that get sent to Solr. | |
SolrBaseQuery:: |
protected | property | DrupalApacheSolrService object | |
SolrBaseQuery:: |
protected | property | ||
SolrBaseQuery:: |
public | function |
Set context value. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Handles aliases for field to make nicer URLs. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
protected | function | ||
SolrBaseQuery:: |
public | function |
Adds a param to be sent when running the Solr search. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Adds multiple params to be sent when running the Solr search. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
protected | function | ||
SolrBaseQuery:: |
public | function |
Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Get context values. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Get query name. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Gets the value of a parameter. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Gets all parameters in normalized form. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Get query searcher name (for facetapi, views, pages, etc). Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
protected | function | Get Single Value params for the base query. | |
SolrBaseQuery:: |
public | function |
Gets parameters in a form suitable for use in a Solr query. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Gets the current sort. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Returns an array representing the URL query string for the current sort. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Get solr version of the query. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
protected | function | ||
SolrBaseQuery:: |
public | function |
Removes an available sort. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Removes all values for one Solr param. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Replaces a param to be sent when running the Solr search. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Sends the search request to Solr, unless $query->abort_search is TRUE. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Adds an available sort. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function | ||
SolrBaseQuery:: |
public | function |
Sets the sort. Overrides DrupalSolrQueryInterface:: |
|
SolrBaseQuery:: |
public | function |
Calls a method, without arguments, on the Solr object with which the query
object was initialized. Overrides DrupalSolrQueryInterface:: |
|
SolrFilterSubQuery:: |
public | property | ||
SolrFilterSubQuery:: |
protected | property | A keyed array where the key is a position integer and the value is an array with #name and #value properties. Each value is a used for filter queries, e.g. array('#name' => 'is_uid', '#value' => 0) for anonymous… | |
SolrFilterSubQuery:: |
public | property | Each query/subquery will have a unique ID. | |
SolrFilterSubQuery:: |
protected static | property | Static shared by all instances, used to increment ID numbers. | |
SolrFilterSubQuery:: |
public | property | ||
SolrFilterSubQuery:: |
protected | property | An array of subqueries. | |
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
protected | function | Builds a set of filter queries from $this->fields and all subqueries. | |
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
public | function | ||
SolrFilterSubQuery:: |
protected | function | ||
SolrFilterSubQuery:: |
public static | function | Make sure our query matches the pattern name:value or name:"value" Make sure that if we are ranges we use name:[ AND ] allowed inputs : a. bundle:article b. date:[1970-12-31T23:59:59Z TO NOW] Split the text in 4 different parts 1. name, eg.:… | |
SolrFilterSubQuery:: |
function |