diff --git a/apachesolr_views_query.inc b/apachesolr_views_query.inc index 53c25f5..870b18b 100644 --- a/apachesolr_views_query.inc +++ b/apachesolr_views_query.inc @@ -14,6 +14,7 @@ class apachesolr_views_query extends views_plugin_query { protected $params; protected $query_params; public $orderby = array(); {+public $shards = array();+} /** * Store results of apachesolr search. @@ -88,6 +89,11 @@ class apachesolr_views_query extends views_plugin_query { $params['defType'] = $this->params['defType']; } {+// Add shards.+} {+ if (!empty($this->shards)) {+} {+ $params['shards'] = implode(',', $this->shards);+} {+ }+} $this->query_params = $params; // Export parameters for preview. @@ -188,6 +194,10 @@ class apachesolr_views_query extends views_plugin_query { return $alias; } {+public function add_shard($url) {+} {+ $this->shards[] = $url;+} {+ }+} public function get_params() { return $this->params; }