diff --git a/VERSIONS_HOTLINE/57923 b/VERSIONS_HOTLINE/57923 new file mode 100644 index 0000000000000000000000000000000000000000..0afd17a5fb7b8cacb8abfa7f3e55047a4a613b91 --- /dev/null +++ b/VERSIONS_HOTLINE/57923 @@ -0,0 +1 @@ + - ticket #57923 : Correction de la recherche des ressources numériques depuis Nanook \ No newline at end of file diff --git a/library/Class/MoteurRecherche.php b/library/Class/MoteurRecherche.php index 646a23b2479d9dc23ec5dc0b995871c775a38ce3..43d7a27f8ed6c2e66f39d26406e35a00ff5b9cec 100644 --- a/library/Class/MoteurRecherche.php +++ b/library/Class/MoteurRecherche.php @@ -87,7 +87,6 @@ class Class_MoteurRecherche { $types = array_keys(Class_TypeDoc::getDigitalDocTypes()); $this->setCondition('(type_doc in (\'' . implode('\',\'', $types). '\'))'); - $this->setOrConditions('(CAST(type_doc AS UNSIGNED) >= ' . Class_TypeDoc::DIGITAL_RESOURCE_THRESHOLD . ')'); } diff --git a/tests/library/Class/MoteurRechercheTest.php b/tests/library/Class/MoteurRechercheTest.php index 9109f9d5f2bde8ec19b4f4aba9a792e36506598c..5c22dd05e53b721574417cc6578f6657eb2871ab 100644 --- a/tests/library/Class/MoteurRechercheTest.php +++ b/tests/library/Class/MoteurRechercheTest.php @@ -308,7 +308,14 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase { [['expressionRecherche' => '', 'digital_lib' => '1'], 'nb_mots'=> 0, - 'req_liste' => 'select id_notice, facettes from notices Where ((type_doc in (\'100\',\'101\',\'102\',\'103\',\'104\',\'105\',\'106\',\'107\',\'108\',\'109\',\'110\',\'111\',\'112\',\'114\',\'113\',\'115\',\'116\',\'117\',\'119\',\'Assimil\'))) or (CAST(type_doc AS UNSIGNED) >= 100)'], + 'req_liste' => 'select id_notice, facettes from notices Where (type_doc in (\'100\',\'101\',\'102\',\'103\',\'104\',\'105\',\'106\',\'107\',\'108\',\'109\',\'110\',\'111\',\'112\',\'114\',\'113\',\'115\',\'116\',\'117\',\'119\',\'Assimil\'))'], + + + [['expressionRecherche' => 'logo', + 'digital_lib' => '1'], + 'nb_mots'=> 1, + 'req_liste' => "select id_notice, facettes from notices Where " . $match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and (type_doc in ('100','101','102','103','104','105','106','107','108','109','110','111','112','114','113','115','116','117','119','Assimil')) order by (MATCH(alpha_titre) AGAINST(' LOGO') * 1.5) + (MATCH(alpha_auteur) AGAINST(' LOGO')) desc"], + [['expressionRecherche' => '', 'id_panier' => 4],