The built-in search is a powerful highly-configurable faceted search that allows for the searching of people and vacancies (subject to product licenses).
Introduction
Users can use the search to find people in all their Business Groups. They can search for people by name or other criteria such as organization, location, employee number, job, or more interesting criteria like qualification or language is spoken. Facets are then used to refine the search results by filtering on criteria such as job or location.
You can configure the Search to look at different data fields.
Using faceted search
The faceted search facility has been built to offer a Google-style search that is easy to use without the need for wildcard signs or having to specify search fields in a prescriptive way. Users should not need training in order to use the search. However, the following aspects of Search are worth explaining:
- For performance reasons, you must type in a minimum of 3 consecutive characters to initiate a search
- The Search looks across all fields specified in the search list and applies an and logical operation. So if you specify Louise Finance, it will find all the people called Louise who work in Finance. It will not find all Louises in addition to all people working in Finance.
- If all the people brought back by the search have the same facet value (e.g., they all work in the same department) then that facet will be hidden (as clicking the single value will have no effect on further restricting the list).
Search fields & facets
The search and facets fields are all held in a User Defined Table called XXAS_SRC_CRITERIA. Each Field is stored as a Row on the table:
The default Search fields are:
- Person Name
- Employee Number
- Contingent Worker Number
- National Identifier
- Job
- Location
- Position
- Organization
- About Me
- Tags
The default Facets are:
- Job
- Location
- Position
- Organization
- Person Type
- Assignment Category
- Employment Category
- Grade
- Payroll
- Qualifications
- Competencies
- Length of Service Range
- Tags
Search Attributes
Each indexed field has four attributes:
- Searchable
- Use as Facet?
- Permission
- Multi-Row
To see or set the attributes for each field you must use the Table Values form:
Searchable
If the Searchable attribute is set to Y then that field can be searched upon, if it is set to N then the search will ignore it. An example of a field you would want to search on would be Job Title or Person Name. An example of a field you would not want to search on is Person Type as that would yield too many unstructured results.
Use as a Facet?
If this is set to Y, then the field is used as a facet. Typically, you should this to group search results as opposed to fields that explicitly identify a single employee. An example of a good facet would be Person Type (Employee, Contractor, etc). A poor choice would be Employee Number or Email Address which would generate too many rows in the facet list.
Multi-Row
Set this to Y if a worker can have multiple instances of this field. An example would be qualifications; people will often have more than one qualification and you will want to search across all of them.
Permission
Fields and Facets can be secure, that is, only certain roles can search or filter on these particular fields. A good example of a secure search field could be Grade or National Identifier which perhaps only HR Professionals would use. A good example of a search facet would be Salary Range or Competency Rating which would be secured data.
To secure a field, you must create a Permission (which is a regular Function). This permission should be added to a Permission Set which can then be granted to Roles in the normal way.
Specify the Code of the Permission in the User Defined Table to make it secure and only visible by that Role.
You cannot secure an individual field's Searchable and Use as Facet properties independently; security is at the field, not property level. The field is either public for both searches and facets or it is secured for both.
Each field must have an attribute for Permission. If the Field is public permission (accessible to anyone who is logged in), you can use the pre-delivered Permission called XXAS_PUBLIC_PERM.
Adding new search fields or facets
To add a new Search field or a new Facet, add a new Row to the User Defined table. The name of the field can contain spaces but avoid special characters like / or \ as this can cause problems in the search functionality.
Once you have added a field, you need to specify each of the 4 attributes in the ‘Tables Values’ screen, as described in the section above.
User-Defined Tables are created within the context of a Business Group, so if you have multiple Business Groups, you will need to perform this setup in each Business Group. If you have many Business Groups, please get in touch with Applaud Consultancy Services who can assist with automating this configuration.
The search formula
Once you have specified the Search fields and facet, you need to tie these fields to values held in the database. This is done via a special Fast Formula. The name of the Fast Formula is generated during Auto setup and has the name [Object prefix]_SRC_ASSIGNMENT, eg, XXX_SRC_ASSIGNMENT. You can go ahead and make changes to this Fast Formula right away; it won't be touched by later Applaud patches.
Setting the search formula
Auto setup configures the search to use the auto-generated formula. It does this by updating the User Defined Table XXAS_SRC_FORMULA. In this table are a single row and column value which is the name of the Search Formula. This will contain the value of the above-generated formula. If you wanted to change this for any reason you can swap this out with a different formula by updating this User Defined Table.
Writing the search formula
In the search Fast Formula, you associate the search field or search facet to values held against a person’s HR Record. Data can either be single-row (only one value will be held against a person’s record) or multi-Row (multiple values will be held against a person’s record).
An example of a single-row field would be Person Name or National Identifier. An example of a multi-row field would be Qualifications held by a person.
Single-row fields
For single-row fields, you must populate a Fast Formula attribute with the appropriate value from the database. You may be able to retrieve this value from an Oracle Database Item, for example, PER_EMPLOYEE_NUMBER. Most of the time, however, you will need to write a Fast Formula Function to retrieve the data.
The name of the Fast Formula Return variable must exactly match the Row value specified for the field in the User Defined Table. If you have specified space in the field name, you must replace this with an underscore, e.g, Person Name should be called Person_Name in the formula.
You then must return all of the single-row attributes at the end of the Fast Formula. If the length may exceed 150 characters, which is a built-in Fast Formula restriction, you can use the special function xxas_src_set_long_output to set the return attribute for values greater than this length.
Call XXAS_SRC_SET_LONG_OUTPUT with two parameters: the search field name and the data value retrieved from the database. An example can be seen in the default Fast Formula XXAS_SRC_ASSIGNMENT that retrieves the About Me field (which can be up to 4000 characters long):
('ABOUT_ME',xxas_src_get_about_me(Person_Id_Input))
Multi-row fields
The same technique is used to tie multi-row data to a search field or facet. The difference is that XXAS_SRC_SET_LONG_OUTPUT must be used in all cases because the concatenated length of all possible fields will usually exceed the Fast Formula character limit.
When calling XXAS_SRC_SET_LONG_OUTPUT or a multi-row field the second parameter must be a string containing a list of all values for that person using a special delimiter, which is the carat (^) symbol.
This delimiter can be changed but we do not recommend you do so; the delimiter has been carefully chosen to not conflict with other special characters; symbols like /, \ or | can affect processing that powers the search. If you have a requirement to change this delimiter, please contact Applaud Support who can work with you to ensure this change is done safely.
An example of calling this Fast Formula Function is shown below.
('QUALIFICATION_TITLE',
XXX_xxas_get_multirow(Person_Id_Input,
Delimiter_Input,
'QUALIFICATION_TITLE'))
In this example, the second parameter will be a list of qualification titles delimited by a (^), e.g., Bachelor of Mathematics^M.B.A^Ph.D – this represents the person having three qualifications with the titles Bachelor of Mathematics, M.B.A. and Ph.D. respectively.
Defining a Facet to be a Range
To define a range as a facet, the PL/SQL function that determines the field should return the range value as a string. So, for example, if you wished to display a salary range, you might have the following function call:
And in the SQL you might have:
Then return '0-10000';
Elsif l_salary between 10001 and 20000
Then return '10001-20000';
Else
Return 'Greater than 20000';
Thus, each salary is put into a particular range which is simply a string that is displayed within the facet.
Faceted Search Crawler
Once the search formula has been created you should run the Concurrent Program Faceted Search Crawler. This goes through all workers, including ex-employees and ex-contingent workers, and runs the search fast formula against each of their assignments for each installed language. The results are then indexed on a database table called XXAS_ASG_SNAPSHOT. This table records the search results and the appropriate facets to display for each worker record.
When deploying to Production, Faceted Search Crawler should be scheduled to run regularly to ensure new employee records and any person record changes are picked up and indexed in the search.
When developing your search Fast Formula you will want to regularly test against an individual test assignment record. You can initiate indexing of a single assignment record by running the following SQL statement:
This will allow you to test the search indexing is working as expected without having to run the Faceted Search Crawler each time.
Faceted Search Crawler Sizing Considerations
Faceted Search Crawler crawls a variety of worker data fields, such as Job, Organization, Position, and then stores this snapshot on an Oracle Text-indexed table called XXAS_ASG_SNAPSHOT. This enables a rapid Google-style search facility that allows users to find people based on data contained on their core HR records.
As a guideline, this snapshot table is typically 2-4 times the size of PER_ALL_ASSIGNMENTS_F per installed language. Most E-Business Suite environments have ample table space to handle this demand; you may wish to check with your Database Administrator nevertheless.
Multiple Languages
By default, the Faceted Search Crawler will index data for all your installed languages. You have the option of only running the process for one particular language.
If a user logs in with a language that has not been indexed, the user will not see any search results. Ensure you run the Faceted Search Crawler for each language where a user may actually search.
Faceted Crawler scheduling
The process takes a snapshot of data at the point it is run. You should consider scheduling the Faceted Search Crawler to run on a regular basis. We recommend running the crawler on a minimum of a daily basis, out of hours where possible.
The process has these parameters:
Parameter | Example Usage | Description |
---|---|---|
Index Optimization | FULL REBUILD |
The recommendations are:
|
Language | All Languages French only |
The language you wish to index. See Multiple Languages. |
Anatomy of an indexed search record
The results of the search Fast Formula are placed in an XML Document stored on the column XXAS_ASG_SNAPSHOT.SEARCH_CONTENT. You can inspect this document to see what has been indexed for a particular worker.
The diagram below shows an example record:
The document is made up of the following components:
- Searchable items. Everything between the <s>..</s> tags are search fields
- Faceted items. Everything between the <f>…</f> tags are Facets.
- Secure items. Each field that is secured against permission appears in a separate section for that permission. In the above example, the Secure Permission XXAS_SRC_SECURED_PERM has been used for Employee Number and National Identifier. This means that only roles with access to that Permission can search on those fields. Similarly, on the facets, only roles with that permission can use the facets for Person Type, Payroll, Assignment Category, and FTE.
- Multi-Row Fields. In the above example, Tags is a multi-row item. You can see the different values are contained in a single string with the carat (^) used as a delimiter between fields. Each of these values will be independently searchable.