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