Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scenario

Configuring CQL for users who might not know about wildcard term and only want all relevant results returned

Searching for “guide”, users might expect all results returned to contain all documents / pages with “guide” term. Using $$query$$ to configure CQL, the results returned is as shown.

...

In actual case however, what users want might be results from “guide*” instead, which would return 2 more files (Multiple filter charts guide, Issue Archiver User guide) as shown.

...

In this case, page owners should use $$query*$$ when configuring CQL to allow users to retrieve all relevant results.

...

See Confluence Search Syntax for more information regarding wildcard.

Description

Use an asterisk (*) at the end of your word to replace multiple characters.

...

Using title~ when configuring CQL


When configuring a CQL for the search function, it might be easier to choose text~ over title~ as using text~ would ensure that users would be able to find all content that contains the relevant term. However, this can turn out to be frustrating for users, especially when the search scope is a huge confluence space whereby the search would find and return all content which could include texts within attachments / page / blogpost which users might not want to be looking at.

Below, we show a comparison in results obtained when using text~ vs when using title~.

Image Added
Image Added

As shown, when configured using title~, users will be able to optimise their search to obtain results which only looks at title of the attachments, while with text~ users will obtain 8 results as the content of attachments are also checked. Depending on the requirements of users, choosing title~ can effectively improve the scope applicable for the search function to improve users experience.

Using wildcard (*) for searches by default


When choosing to optimise searches for users using title~ over text~, it is important to keep in mind that there can be users who do not have any idea about Confluence Search Syntax and the possibility of using wildcards in searches.

Info

Wildcards

Using an asterisk (*) to replace multiple characters.

Examples

  • p*t finds content containing ‘print', 'part', 'post', 'past’ and so on.

  • print* finds content containing 'printer', 'printing', 'prints' and so on.

  • result* finds content containing result, results, resultant, resulting, resultful, resultless and so on.

In this case, users might feedback that the search function is not effective or broken, as searching for “guide”, they would only be getting 3 results as shown below, even though there are several other attachments which also contain “guide” in the title.

Image Added

For many users, the above issue can be solved if they had added a wildcard at the end of their search term (i.e. guide*).

To improve the search functionality to cater to these users, it is recommended that the wildcard (*) be defined to be attached to the end for all search terms by default. This can be achieved through the use of $$query*$$ when configuring CQL rather than $$query$$ as shown below.

Image Added

Using appropriate CQL to limit the scope


Limiting the search scope through proper CQL configured can effectively narrow down the results obtained by users to improve their experience with using Confluence. Check out Useful scenarios with Canned Search for Confluence for more examples on possible methods of configuring CQL to limit the search scope to meet users needs.