Projet

Général

Profil

Bug #40088

dictionnaire french_unaccent et accents

Ajouté par Frédéric Péters il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
21 février 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

dictionnaire french et recherche "déchets" :

combo=# SELECT "search_indexedcell"."id",
   ts_rank((setweight(to_tsvector('french'::regconfig, COALESCE("search_indexedcell"."title", '')), 'A') || setweight(to_tsvector('french'::regconfig, COALESCE("search_indexedcell"."indexed_text", '')), 'A')), plainto_tsquery('déchets')) AS "rank" FROM "search_indexedcell" 
 where id = 478;
 id  |   rank   
-----+----------
 478 | 0.759909

dictionnaire french_unaccent et recherche "déchets" :

combo=# SELECT "search_indexedcell"."id",
   ts_rank((setweight(to_tsvector('french_unaccent'::regconfig, COALESCE("search_indexedcell"."title", '')), 'A') || setweight(to_tsvector('french_unaccent'::regconfig, COALESCE("search_indexedcell"."indexed_text", '')), 'A')), plainto_tsquery('déchets')) AS "rank" FROM "search_indexedcell" 
 where id = 478;
 id  | rank 
-----+------
 478 |    0

dictionnaire french_unaccent et recherche "dechets" :

combo=# SELECT "search_indexedcell"."id",
combo-#    ts_rank((setweight(to_tsvector('french_unaccent'::regconfig, COALESCE("search_indexedcell"."title", '')), 'A') || setweight(to_tsvector('french_unaccent'::regconfig, COALESCE("search_indexedcell"."indexed_text", '')), 'A')), plainto_tsquery('dechets')) AS "rank" FROM "search_indexedcell" 
combo-# where id = 478;
 id  |   rank   
-----+----------
 478 | 0.759909

Il manque l'info de dictionnaire dans le plainto_tsquery, en la mettant, french_unaccent et recherche "déchets" :

combo=# SELECT "search_indexedcell"."id",
   ts_rank((setweight(to_tsvector('french_unaccent'::regconfig, COALESCE("search_indexedcell"."title", '')), 'A') || setweight(to_tsvector('french_unaccent'::regconfig, COALESCE("search_indexedcell"."indexed_text", '')), 'A')), plainto_tsquery('french_unaccent'::regconfig, 'déchets')) AS "rank" FROM "search_indexedcell" 
where id = 478;
 id  |   rank   
-----+----------
 478 | 0.759909

Fichiers

Révisions associées

Révision aa547dbf (diff)
Ajouté par Frédéric Péters il y a environ 4 ans

search: pass dictionary configuration to search query (#40088)

Historique

#1

Mis à jour par Frédéric Péters il y a environ 4 ans

#2

Mis à jour par Thomas Noël il y a environ 4 ans

  • Statut changé de Solution proposée à Solution validée
#3

Mis à jour par Frédéric Péters il y a environ 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit aa547dbfcacc50c5eb7ada1a8f31cc35c759f958
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Fri Feb 21 16:16:19 2020 +0100

    search: pass dictionary configuration to search query (#40088)
#4

Mis à jour par Frédéric Péters il y a environ 4 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF