Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc for gmf FTSearch's similarity #3682

Merged
merged 2 commits into from
Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion contribs/gmf/apps/desktop_alt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@
module.constant('langUrls', langUrls);
module.constant('cacheVersion', cacheVersion);
module.constant('authenticationBaseUrl', 'https://geomapfish-demo.camptocamp.net/2.2/wsgi');
module.constant('fulltextsearchUrl', 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/fulltextsearch?limit=30&partitionlimit=5&interface=desktop');
module.constant('fulltextsearchUrl', 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/fulltextsearch?limit=30&partitionlimit=5&interface=desktop&ranksystem=similarity');
module.constant('gmfRasterUrl', 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/raster');
module.constant('gmfPrintUrl', 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/printproxy');
module.constant('gmfProfileJsonUrl', 'https://geomapfish-demo.camptocamp.net/2.2/wsgi/profile.json');
Expand Down
10 changes: 9 additions & 1 deletion contribs/gmf/src/directives/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ gmf.module.value('gmfSearchTemplateUrl',
* <script>
* (function() {
* let module = angular.module('app');
* module.value('fulltextsearchUrl', '${request.route_url('fulltextsearch', _query={"limit": 20}) | n}');
* module.value('fulltextsearchUrl', '${request.route_url('fulltextsearch', _query={"limit": 20, "ranksystem": "similarity"}) | n}');
* module.value('gmfSearchGroups', []);
* module.constant('gmfSearchActions', [
* {action: 'add_theme', title: 'Add a theme'},
Expand Down Expand Up @@ -95,6 +95,14 @@ gmf.module.value('gmfSearchTemplateUrl',
* })();
* </script>
*
* The 'fulltextsearchUrl' value in the examples above set three "_query" parameters: "limit",
* "partitionlimit" and "ranksystem". For this last one "similarity" is the only effective value. It's used to
* order your search results with another rank system. Read the full-text search c2cgeoportal documentation
* to know more.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should explain whait is the default value (if ranksystem is not set)

* You can also add these parameters to the "url" variable of one (or more) of the
* gmfx.SearchDirectiveDatasource given to this component (here within the "ctrl.searchDatasources"). That
* allows you to have multiples configurations on one search component.
*
* @param {string} gmfSearchTemplateUrl URL to template.
* @htmlAttribute {string} gmf-search-input-value The input value (read only).
* @htmlAttribute {ol.Map} gmf-search-map The map.
Expand Down