Logga

Search - Advanced

Advanced

Access control

Here you determine how the hits are to be to access controlled. The choices available are:

  • Early check (use permissions in query)
  • Late check (via filtering of search results)

This is a performance-related setting. It is performance-demanding (time/memory) to retrospectively check all hits of a search result. The default setting is early check.

However, the use of late check may be necessary if early check cannot be used. An example of such a potential case is whether there are IP address ranges set up on the website. These allow some non-authenticated users (via their IP-number) to have the right to read certain pages - even though they are not public. If early check is used, non-authenticated users will only receive public pages/files/images in their search results.

Sort order

The search results are listed/sorted by hit points (relevance) if no specific sort order is set. The hit points are calculated by the search engine and depend on how important the search query is in relation to the documents found. The calculation of the points depends on many factors and correlations, but the most crucial are:

  • how many times the search word is included in the text
  • how early in the text the search word is
  • how much of the text the search word is (the search word ranks higher in a short text than long text)
  • how the index field in which the search word appears is prioritised
  • how the hits are prioritised

If you want to deviate from the relevance sort order (i.e. "best" hits first), you can specify which field(s) this module should use as standard.

Use custom sort order for hits

Tick this box and click the Add sort order link to add a sort order field. A new view opens:

Add sorting

Field name

A sortable (a field that is not analysed and does not have multiple values) field that is in the search index. E.g. "name", "name.sortable", "title", "title.sortable" och "lastpublished".

To sort on metadata, the field name begins with "metadata.sortable.". If your metadata is named "keywords", the field name is named "metadata.sortable.keywords".

Order

Search results can be displayed in ascending or descending order. By default, search results are sorted ascending.

Example: To sort by the last date of publication, type Field name: lastpublished and Sort order: Descending (see image above).

Hit count accuracy

Breakpoint accuracy

Here you set an upper limit for accuracy. The default value is 20 hits. That is, if the search result contains more than 20 hits, it does not need to be displayed exactly but if there are 20 hits or less, the exact number should be displayed.

This is a performance-related setting. It is performance-demanding (time/memory) to check the "exact" number of hits for a large search result. However, you may need to set the breakpoint if accuracy is important or deviates too "much" for some users (some users may not have permission to see certain hits in the search results).

Query

Use wildcard search

This setting means that simple search words are automatically remade into wildcard expressions. This is done to expand the hit pattern, i.e. more search hits – regardless of the word suffix.

If, for example, the visitor enters "module" as search query , the actual search is performed on "module" AND "module*".

If the visitor enters a multi-word search query, such as "module containing questions", the actual search is performed on "module" AND "containing" and "questions" AND "questions*". That is, wildcard search only occurs on the last word if the visitor enters multiple words.

This setting should always be enabled if the module is set up to use direct search, or if the module is designated as results module by the "Search field for users and content" module

Selection

Use an additional filter query to limit the search results

By specifying your own additional filter query, it is possible to limit the hits that the visitor should see further. Only the hits that meet the search query and the filter query will appear in the search results.

Note that the module via the Selection tab already has a certain filtering. This filtering is to filter further.

Below is an example of how the filter expression would look if you do not want to include any hits that are under a particular archive (in this case, the archive ID number is 3.623457cf131278f397c7ffd17609).

- path:3.623457cf131278f397c7ffd17609

To write a filter query, you need to know what you can filter on (that is, what fields are in the index, and which values the field has for the items you want to filter out).

To find this information, you can make a search query against the index or click on the "Show indexed" button on a file/page/image.

Further information for developers (English only)

If you enable the "Filter query is dynamic..." check box, you can enter dynamic expressions in Velocity using SiteVision’s public API
Available elements in the filter query template

Templates

Use custom template for the structure of template parts

This template affects how the search results are structured. That is, if you want to change the order of how things are presented. For example, to display "Did you mean" under the paging.

Help with scripts is not included in the support agreement.

Template parts

Use custom template for the structure of template parts

This template affects the appearance of the search form. For example, to add a tag above the search field.

Use custom template for search form

This template affects the appearance of the search form.

Use custom "Did you mean" template

This template will affect how "Did you mean" appears.

Use custom hit count template

This template affects how many hits are displayed.

Use custom template for paginating hits

This template affects the display of paging.

Use custom template for hits

This template affects the appearance of how the hits of the search results are presented. For example, to add more information from a metadata field.

Use custom template for error messages

This template affects the error message that is displayed.

Further information for developers (English only)

The code in the custom templates for this module uses SiteVision’s public API
Available elements in the custom template

The page published: 2020-08-25

Hjälpte informationen dig?

Find us!

SiteVision AB (Headquarter)
Vasagatan 10
702 10 Orebro
Sweden


Info: +46 19-17 30 30
Support: +46 19-17 30 39