Skip to content
Snippets Groups Projects
Commit 62666d2f authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #80530 : fix RT

parent e9b298f9
Branches
Tags
4 merge requests!2869Master,!2854Hotline#80953 story nanook 41 caracteres accentues etalon,!2853Dev#80530 minsoc indexation des resumes indexation tous champs,!2842Dev#80530 minsoc indexation des resumes indexation tous champs
Pipeline #5071 passed with stage
in 47 minutes and 37 seconds
'80530' =>
['Label' => $this->_('Possibilité d\'indexer tout champ unimarc pour la recherche simple'),
'Desc' => '',
'Desc' => $this->_('Bokeh peut indexer le contenu de n'importe quelle zone unimarc pour la recherche simple plein texte'),
'Image' => '',
'Video' => '',
'Category' => $this->_('Recherche'),
......
......@@ -149,24 +149,23 @@ class Class_MoteurRecherche {
}
$axes = ['titres', 'auteurs', 'editeur', 'collection', 'matieres', 'dewey'];
$match_weights = ['titres' => '1.5',
'auteurs' => '1'];
if (trim(Class_CosmoVar::get('other_index_fields')))
$axes []= 'other_terms';
$this->setCondition('MATCH(' . implode(', ', $axes) . ')' . $against);
if (!($tri and $tri != '*' and !$pertinence)) {
$against_titre = $terms->asSelectAgainst();
$match_weights_string = [];
foreach($match_weights as $axe => $weight) {
$match_weights_string []= 'MATCH(' . $axe . ') ' . $against_titre . ( $weight === '1' ? '' :' * ' . $weight);
}
if (($tri and $tri !== '*') and !$pertinence)
return;
$this->order_by = 'order by (' . implode(') + (', $match_weights_string) . ') desc';
}
$against_titre = $terms->asSelectAgainst();
$match_weights = ['titres' => '1.5', 'auteurs' => '1'];
$match_weights_string = [];
foreach($match_weights as $axe => $weight)
$match_weights_string []= 'MATCH(' . $axe . ') ' . $against_titre . ( $weight === '1' ? '' :' * ' . $weight);
$this->order_by = 'order by (' . implode(') + (', $match_weights_string) . ') desc';
}
......
......@@ -234,7 +234,4 @@ class Class_NoticeUnimarc {
return implode(' ', $datas);
}
}
?>
......@@ -3,7 +3,7 @@ error_reporting(E_ERROR | E_PARSE);
require(__DIR__.'/../console.php');
echo "\n\nWelcome to the iReindex Other Terms 2000 X tool by @lla & @patbator\n\n";
echo "\n\nWelcome to the iReindex Other Terms 2000 X tool by @lla & @patbator, proudly RTed by @ghislo \n\n";
$page = 1;
$other_index_fields = Class_CosmoVar::getAsFields('other_index_fields');
......
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