Skip to content

Commit

Permalink
Add solr4 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Feb 14, 2016
1 parent d6bee9d commit 33684cd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/org/openpsa/documents/handler/search.php
Expand Up @@ -40,12 +40,14 @@ public function _handler_search($handler_id, array $args, array &$data)

// Add the search parameters
$query = $_GET['query'];
$query .= " AND __TOPIC_URL:\"{$node[MIDCOM_NAV_FULLURL]}*\"";
$query .= " AND __COMPONENT:org.openpsa.documents";

$filter = new midcom_services_indexer_filter_chained;
$filter->add_filter(new midcom_services_indexer_filter_string('__TOPIC_URL', '"' . $node[MIDCOM_NAV_FULLURL] . '*"'));
$filter->add_filter(new midcom_services_indexer_filter_string('__COMPONENT', '"' . $this->_component . '"'));
// TODO: Metadata support

// Run the search
$this->_request_data['results'] = $indexer->query($query, null);
$this->_request_data['results'] = $indexer->query($query, $filter);
}

$this->add_stylesheet(MIDCOM_STATIC_URL . "/org.openpsa.documents/layout.css");
Expand Down

0 comments on commit 33684cd

Please sign in to comment.