Commit fb9eee47 authored by marthinal's avatar marthinal

#2612084 Added Core Facet Manager

parent fef2313e
<?php
/**
* @file
* Contains Drupal\facetapi\FacetManager\CoreSearchFacetManager.
*/
namespace Drupal\facetapi\FacetManager;
class CoreSearchFacetManager extends DefaultFacetManager {
/**
* The facet query being executed.
*/
protected $facetQueryExtender;
/**
* Sets the facet query object.
*
* @return FacetapiQuery
*/
public function getFacetQueryExtender() {
if (!$this->facetQueryExtender) {
//$this->facetQueryExtender = db_select('search_index', 'i', array('target' => 'replica'))->extend('Drupal\search\ViewsSearchQuery');
//$this->searchQuery->searchExpression($input, $this->searchType);
//$this->searchQuery->publicParseSearchExpression();
$this->facetQueryExtender = db_select('search_index', 'i', array('target' => 'replica'))->extend('Drupal\facetapi\FacetapiQuery');
$this->facetQueryExtender->join('node', 'n', 'n.nid = i.sid');
$this->facetQueryExtender
//->condition('n.status', 1)
->addTag('node_access')
->searchExpression($this->keys, 'node_search');
}
return $this->facetQueryExtender;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment