Commit d7557f1e authored by Dainis Abols's avatar Dainis Abols
Browse files

Sorting changes

v1.3.1
parent f1637b93
...@@ -290,9 +290,6 @@ class SearchController extends ActionController ...@@ -290,9 +290,6 @@ class SearchController extends ActionController
'prewar_residence:('.$query.')', 'prewar_residence:('.$query.')',
]; ];
// Assign filters
$solr->setFilters($filters);
// Set sort // Set sort
foreach ($this->sort as $sort => $options) { foreach ($this->sort as $sort => $options) {
if ($options['selected'] == 1) { if ($options['selected'] == 1) {
...@@ -307,17 +304,26 @@ class SearchController extends ActionController ...@@ -307,17 +304,26 @@ class SearchController extends ActionController
break; break;
case 'maiden_name': case 'maiden_name':
$this->mandatory[] = 'maiden_name'; $this->mandatory[] = 'maiden_name';
$filters = [
'maiden_name:('.$query.')',
];
$solr->sort('maiden_name', 'asc'); $solr->sort('maiden_name', 'asc');
$solr->sort('family_name', 'asc'); $solr->sort('family_name', 'asc');
$solr->sort('given_name', 'asc'); $solr->sort('given_name', 'asc');
break; break;
case 'family_name': case 'family_name':
$this->mandatory[] = 'family_name'; $this->mandatory[] = 'family_name';
$filters = [
'family_name:('.$query.')',
];
$solr->sort('family_name', 'asc'); $solr->sort('family_name', 'asc');
$solr->sort('given_name', 'asc'); $solr->sort('given_name', 'asc');
break; break;
case 'mother': case 'mother':
$this->mandatory[] = 'mother'; $this->mandatory[] = 'mother';
$filters = [
'mother:('.$query.')',
];
$solr->sort('mother', 'asc'); $solr->sort('mother', 'asc');
$solr->sort('family_name', 'asc'); $solr->sort('family_name', 'asc');
$solr->sort('given_name', 'asc'); $solr->sort('given_name', 'asc');
...@@ -326,6 +332,9 @@ class SearchController extends ActionController ...@@ -326,6 +332,9 @@ class SearchController extends ActionController
} }
} }
// Assign filters
$solr->setFilters($filters);
// Set mandatory fields // Set mandatory fields
$solr->setMandatory($this->mandatory); $solr->setMandatory($this->mandatory);
......
{ {
"name": "luitd/lu-names", "name": "luitd/lu-names",
"version": "1.3.0", "version": "1.3.1",
"description": "Jews in Latvia names database extension for TYPO3", "description": "Jews in Latvia names database extension for TYPO3",
"type": "typo3-cms-extension", "type": "typo3-cms-extension",
"keywords": [ "keywords": [
......
...@@ -9,11 +9,11 @@ $EM_CONF[$_EXTKEY] = [ ...@@ -9,11 +9,11 @@ $EM_CONF[$_EXTKEY] = [
'author_email' => 'lauris.karklis@lu.lv, dainis.abols@lu.lv', 'author_email' => 'lauris.karklis@lu.lv, dainis.abols@lu.lv',
'state' => 'stable', 'state' => 'stable',
'clearCacheOnLoad' => true, 'clearCacheOnLoad' => true,
'version' => '1.3.0', 'version' => '1.3.1',
'constraints' => [ 'constraints' => [
'depends' => [ 'depends' => [
'typo3' => '9.5.0-10.9.99', 'typo3' => '9.5.0-10.9.99',
'lu_api' => '2.7.0-2.9.99', 'lu_api' => '2.8.0-2.9.99',
], ],
], ],
'autoload' => [ 'autoload' => [
......
No preview for this file type
...@@ -4,7 +4,7 @@ Jews in Latvia names database extension for TYPO3TYPO3 Extension for Regulations ...@@ -4,7 +4,7 @@ Jews in Latvia names database extension for TYPO3TYPO3 Extension for Regulations
## Version ## Version
1.3.0 1.3.1
## Dependecies ## Dependecies
......
Supports Markdown
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