@@ -65,7 +65,7 @@ gmf.module.value('gmfSearchTemplateUrl',
65
65
* <script>
66
66
* (function() {
67
67
* let module = angular.module('app');
68
- * module.value('fulltextsearchUrl', '${request.route_url('fulltextsearch', _query={"limit": 20}) | n}');
68
+ * module.value('fulltextsearchUrl', '${request.route_url('fulltextsearch', _query={"limit": 20, "ranksystem": "similarity" }) | n}');
69
69
* module.value('gmfSearchGroups', []);
70
70
* module.constant('gmfSearchActions', [
71
71
* {action: 'add_theme', title: 'Add a theme'},
@@ -95,6 +95,15 @@ gmf.module.value('gmfSearchTemplateUrl',
95
95
* })();
96
96
* </script>
97
97
*
98
+ * The 'fulltextsearchUrl' value in the examples above set three "_query" parameters: "limit",
99
+ * "partitionlimit" and "ranksystem". For this last one "similarity" is the only effective value. It's used to
100
+ * order your search results with the "similarity" ranking system from PostgreSQL module pg_trgm. Without this value,
101
+ * the PostgreSQL function "ts_rank_cd" is used for the ranking. Read the full-text search c2cgeoportal documentation
102
+ * to know more.
103
+ * You can also add these parameters to the "url" variable of one (or more) of the
104
+ * gmfx.SearchDirectiveDatasource given to this component (here within the "ctrl.searchDatasources"). That
105
+ * allows you to have multiples configurations on one search component.
106
+ *
98
107
* @param {string } gmfSearchTemplateUrl URL to template.
99
108
* @htmlAttribute {string} gmf-search-input-value The input value (read only).
100
109
* @htmlAttribute {ol.Map} gmf-search-map The map.
0 commit comments