In this article we will explain a number of scenarios for adding an In Focus web part to a page, then applying metadata filters using various methods so that users viewing the page see a pre-filtered set of content defined by your tags.
In this article:
- How does filtering work by default?
- Create a page and set metadata tags
- Add an In Focus web part to the page
- Page tags filtering
- Custom filtering
- Need assistance?
How does filtering work by default?
Atlas pages and web parts will by default interact to provide automatic filtering. This is done by matching the Atlas metadata on the page to the items being returned in the In Focus web parts on that page.
For example, if I have a Finance workspace with the "Finance" Department tag applied to the page and I add a News (Atlas) web part, News will only be shown if it shares the same Department tag. This is the default behaviour but it can be changed by modifying the Result Source for the In Focus web part.
Sometimes though, you might need to set up your own specific filter for a web part, which can be either combined with the page tags, or applied while ignoring them.
Create a page and set metadata tags
To use any web part you will need a page to put it on. If you have already created a page you can skip this step, otherwise create a new page via Add It. We'd recommend a Knowledge Page which can be created by following this guide: Add a Knowledge Page
While creating your page you should consider which tags you are applying, due to the automatic filtering by the page tags. However if you plan to ignore the page tags this is less important.
Add an In Focus web part to the page
Now that you have a page, go into Edit mode then click in the main section and click the + on the bar that appears when you hover. If you type Atlas into the search box you can see all the Atlas components which will include all the In Focus web parts:
Choose the In Focus web part which best matches the content you intend to show, so for example if you want to show News choose the "News (Atlas)" component, or if you want to show Documents choose the "Documents (Atlas)" component.
Page tags filtering
Page tags filtering will match content to all Atlas Global metadata - Activity, Department, Entity, Location and Subject. Information Type, News Type etc. are not included.
Match page tags
If you do nothing the results will simply be filtered by the page tags.
Ignore page tags
To apply no filters at all, edit the In Focus web part (or the Verticals if using them) and ensure that the Result Source is changed from e.g. Documents (Atlas) to All Documents (Atlas).
All Atlas Result Sources have an "All" version. Click here to see a reference of all Result Sources.
Custom filtering
By custom filtering, what we mean is that we will tell the web part which filters we want it to apply. Before setting up filters, we recommend thinking whether you want to include the page tags or not. If your custom filter is an additional filter you can keep the Result Source as it is and include page tags. If not, change the Result Source to the "All" version.
Simple filtering
If you only need to apply a set of filters without logic (OR/AND operations), the easiest way is to apply it through the UI. Put the page into Edit mode, then apply the filter(s) directly to the Filters web part. With the filters in place, edit the In Focus web part, then in the Search section find the Refinement filters box:
This will be blank, but when you click the Apply selected filters button it will be populated with the specific filters you chose.
Complex filtering with logic
The above simply includes content matching all the tags you specified. However you may want to do something more complex. For this example, let's say you want to find all Policy documents from Finance or HR that are tagged with "Expenses".
We can build a logical expression for this using brackets, AND and OR operators as follows:
Information Type:"Policy" AND (Department:"Finance" OR Department:"HR") AND Subject:"Expenses"
To express this in the In Focus web part we'll need to use the managed properties to refer to the metadata fields. Managed properties are listed here: Atlas Managed Properties for Search
Converting the labels to the managed properties we get the following:
RefinableString145:"Policy" AND (RefinableString147:"Finance" OR RefinableString147:"HR") AND RefinableString137:"Expenses"
So now we have our logical expression which should return the set of documents we want.
- With the above done, edit your page.
- If you are not using Verticals configure your In Focus web part, open the Search section and find the Query template box. Leave the {searchTerms} text, add a space after, then paste your logical expression in the box:
- If you are using Verticals, edit the Verticals web part and modify the query template as above but for each vertical you want the filters applied to. So you can choose to apply it to specific verticals or to all of them.
- Once you have applied the logic in the correct web parts, save the page. You'll see that the items being returned are only those matching your query.
Need assistance?
If you are having trouble setting up the web parts in this article, please contact your CSM or our support helpdesk.
Comments
0 comments
Please sign in to leave a comment.