What
Build a Structured query by grouping Search terms and Filter terms to return more bespoke responses that can then be saved and used again later. This article will walk you through building a simple search using one field, right through to using Groups and operators to build a specific query. By building Groups to filter the expansive data within Mercury, the process of looking for relevant Candidates is made that much easier!
Where
For this article we have accessed Search via the Contacts area.
Home > Contacts > Search > Mercury Search.
NOTE: Search opens with the Structured tab selected by default.
How
Structured Search is composed of two different, but interacting areas: Search terms and Filter terms. These two areas can be used individually or together to search across Candidates. Edit the logic and operators between terms by clicking the Edit Structure button, which only appears after at least one term is populated.
Creating Groups in Structured Search
1. Select the Structured tab, and populate at least one term under Search or Filter. Enter the search terms - e.g. Job Title: Automotive Engineer and Tags: Specialism > Automobile. To see a description of each Search term and Filter term, see Glossary for Search Terms and Filter Terms in Search.
2. To view and create groups, select Edit Structure.
3. For any terms already populated, these will also show up in the corresponding group tab in individual groups, connected by an AND operator by default.
4. There are two different ways to add terms into groups. Either: drag & drop a search filter into the Groups panel using the symbol, or click the Add dropdown button beside each term.
Nested Groups
This feature allows for refined searches by combing a Group within a Group. The main benefit of this function is that it allows greater control of the pool of results that are returned, as now we are restricting a Search term even further, so now only a select amount of Candidates are returned. The method of a grouped search stays the same as the previous section; the main deviation is at the stage where you drag a filter into a group. This example shows how to create nested groups in the Search Groups panel, but the logic is identical for Filter Groups.
1. Drag & drop a search term (in the example, a Job Title) into the Search Groups panel, into the option Drag a search term here to add a new group. This will add the term to Search Group 1:
Example search query: "Return Candidates whose Job Title histories include Project Manager".
2. A second search term is added (another Job Title), also within Search Group 1, with an OR operator connecting the two:
Current search query: "Return Candidates whose Job Title histories include Project Manager OR Project Consultant".
3. A third search term (a Tag) is added into Search Group 1. However, it needs to be connected with an AND operator. This is done by dragging the term into a sub-group within Group 1, under the option Drag a search term here to add to a new sub group in Search Group 1. This then creates Search Group 1.1.
Final search query: "Return Candidates (whose Job Title histories include Project Manager OR Project Consultant) AND have Agile Methodology listed as a skill". In other words, return Candidates of either job title, as long as they have Agile skills.
Mercury Search Logic Diagram
This diagram shows what operators are available at each query ‘level’. This example drills down from the Search terms, the logic is identical for Filter terms.
NOTE: Only a few search terms and filter terms will be used to ease understanding for illustrative purposes. Search offers a much more comprehensive, wide range of search terms and filter terms.
- Search & Filter: At the highest level; all terms used within Search are connected to terms within Filter with an AND operator. For example, search by ‘Job Title’ AND ‘Vacancy Shortlist Status’.
- Search Groups: Groups can be connected to each other with either: AND, OR, AND NOT operators.
- Individual terms: within Groups, individual search terms can be connected with either an OR operator or an AND operator.
Using only the illustrative Search terms, some examples of how this query could be be built includes:
- Show me Candidates who have job titles of either Full Stack Developer OR Lead UI Developer, AND NOT those who have worked for both Dell AND Apple.
- Show me Candidates who have been both Full Stack Developers AND Lead UI Developers, OR those who have worked for either Dell OR Apple.
Use Case example using Search Groups and Filter Groups
Scenario: A recruiter is looking for the perfect Candidate to fill the role of Regional Restaurant Manager. The Client wants someone with current experience as a restaurant manager, but also someone who has proven past experience in customer service. They will need to be able to travel between the two restaurant locations; one in Birmingham and the other in Leicester. However, they do not want to hire anyone who has worked for their two main competitor chains. They’ve expressed that they need to fill the role quite soon, within the next few months. Here’s what that search query might look like, both within the UI and as bullet points.
Return Candidates who:
(Search Groups)
- Have ‘Restaurant Manager’ experience at any point,
AND
- Have previous customer service experience,
AND
- Have locations listed as Birmingham AND Leicester,
AND NOT
- Wetherspoons or Greene King as previous employers,
AND
(Filter Groups)
- Are available on/before 01/11/24,
AND
- Are actively looking for new employment opportunities.
NOTE: Availability and Situation may not be requirements directly from the Client, but by using these Filter Groups, users can narrow down results to Candidates closer suited to the role, in relation to their job-hunting activity and preferences. In this case, having an availability to start a new job within a set amount of time, and returning those only actively looking for a new role, as opposed to, e.g., passively looking / not looking at all.
Saving and Loading A Query
1. To run a search again using the same filters/groups in the future, the query can be saved. Select Save Query, name it, then click Confirm and Save:
2. To use that saved filter again, click Managed Saved Queries. Saved queries can be shared, deleted or loaded. Structure Edited means that the Edit Structure button was selected while building the query. If a basic search was conducted without creating groups or changing the operators between groups, etc., this tag will not show. Two saved queries of the same kind (either both with an edited structure, or both basic) cannot be saved under the same name. However, one of each kind can be. See the two queries below with the same name:
3. If you try to save an identical query with the same name, you will get this error with the option to cancel or overwrite:
END