Views: 3068 (Data available since 06.02.2017)
Last Modified: 24.06.2015
After a user enters the search query and clicks Search, the system searches the index and selects pages matching the query. Before results are displayed to a user, they are sorted:
- by relevance (which is usually defined by density of keywords on a given page);
- or by the page timestamp.
Users can choose the sorting mode on the search result page by clicking on one of the links: Sort by relevance or Sort by date.
Sometimes you may need give preference to certain documents when displaying the search results. For example, you may want to put goods that are to be sold out as soon as possible, higher in the search results. To achieve this, a special facility has been developed allowing to assign a required weight (page rank) to required pages. Pages matching the specified ranking criteria will be put at the top of the search result list, according to page ranks indicated in the ranking rules.
A fixed rank can be assigned to:
- static files (requires full path to be supplied);
- information blocks (you can specify an information block type, an information block and an element which should have the specified priority);
- forums (the required forum, a forum thread and a message can be specified).
You can create and manage ranking rules in the Search result sorting rules form (Settings -> Search -> Search result sorting rules):
Adding or modifying a rule involves two steps:
- ranking rules management: creating, modifying or deleting ranking rules;
- search index update.
To create a new rule, click Add on the context toolbar. This will open the rule editing form:
In the form, you have to select the site and the module to which the rule will be applied. Meaning of the other fields depends on the selected module:
- static files: you can specify the priority of a required file;
- information blocks: you can specify the priority of a chosen information block type; information block; information block section and element;
- forums: you can create ranking rules for the selected forum, forum thread or a forum message.
After save, the rule is added to the list:
After you have created a new rule or modified an existing one, you have to refresh the search index by clicking Update:
After the update process completes, results are displayed:
Note: For any changes in rules (modification or deletion ) to take effect, you also have to update the index.