mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Merge branch '3.3'
This commit is contained in:
commit
f89818909a
@ -6,6 +6,7 @@ use ReflectionClass;
|
||||
use SilverStripe\Core\ClassInfo;
|
||||
use SilverStripe\Core\Config\Configurable;
|
||||
use SilverStripe\FullTextSearch\Search\Indexes\SearchIndex;
|
||||
use SilverStripe\FullTextSearch\Search\Queries\SearchQuery;
|
||||
use SilverStripe\FullTextSearch\Utils\CombinationsArrayIterator;
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ class SearchVariantVersioned extends SearchVariant
|
||||
|
||||
public function alterQuery($query, $index)
|
||||
{
|
||||
$query->filter('_versionedstage', [
|
||||
$query->addFilter('_versionedstage', [
|
||||
$this->currentState(),
|
||||
SearchQuery::$missing
|
||||
]);
|
||||
|
@ -65,6 +65,10 @@ class SearchForm extends Form
|
||||
$searchTerms = $request->requestVar('Search');
|
||||
$query = SearchQuery::create()->addSearchTerm($searchTerms);
|
||||
|
||||
if ($start = $request->requestVar('start')) {
|
||||
$query->setStart($start);
|
||||
}
|
||||
|
||||
$params = [
|
||||
'spellcheck' => 'true',
|
||||
'spellcheck.collate' => 'true',
|
||||
|
Loading…
Reference in New Issue
Block a user