diff --git a/code/model/SolrResultSet.php b/code/model/SolrResultSet.php index 2e025dd..cfadf33 100644 --- a/code/model/SolrResultSet.php +++ b/code/model/SolrResultSet.php @@ -12,7 +12,7 @@ class SolrResultSet { /** * A list of solr field type suffixes to look for and swap out */ - static $solr_attrs = array('txt', 'ms', 's', 't', 'i', 'dt', 'f', 'p'); + static $solr_attrs = array('as', 'ms', 's', 't', 'i', 'dt', 'f', 'p'); /** * The raw lucene query issued to solr diff --git a/code/pages/SolrSearchPage.php b/code/pages/SolrSearchPage.php index 27ca229..d78dab0 100644 --- a/code/pages/SolrSearchPage.php +++ b/code/pages/SolrSearchPage.php @@ -411,12 +411,12 @@ public function getQuery() { if (count($types)) { $sortBy = $this->solrSearchService->getSortFieldName($sortBy, $types); - $builder->andWith('ClassNameHierarchy_ms', $types); + $builder->addFilter('ClassNameHierarchy_ms', implode(' OR ', $types)); } if ($this->SearchTrees()->count()) { $parents = $this->SearchTrees()->column('ID'); - $builder->andWith('ParentsHierarchy_ms', $parents); + $builder->addFilter('ParentsHierarchy_ms', implode(' OR ', $parents)); } if (!$sortBy) {