The custom ranking feature allows you to introduce your own business logic to control the ranking of jobs returned by Cloud Talent Solution. A job seeker searching on a site can set their search query and other filters as always, and you can add a ranking expression to the search request. Cloud Talent Solution determines the relevant jobs to the query defined by the job seeker, and ranks the results based on the custom ranking expression. This ranked list is then returned to you so that you can display it to the job seeker. A video tutorial on implementing custom ranking is also available.
Benefits
Custom ranking allows you to control on how the results are listed. Using a custom ranking lets you define weights you can assign to custom attributes. You can use a combination of weights and custom attributes to build a custom ranking expression to determine the order the returned listings.
Custom ranking is built on the existing search service. It leverages the values provided in any customer-defined combination of the custom attributes.
Example use case
The end user searches for "Software Engineer". Your business wants to showcase higher return listings for "Software Engineer". Using Custom Ranking allows you to place a value on these listings and show them to the end user in the order determined by the custom ranking expression.
For example, you have two nearly identical job listings with job-A having a higher cost per click (CPC) value than job-B. You can use custom ranking to increase the visibility of job-A by setting the adjusting the ranking of the CPC custom attribute with weights.
How to use
Custom ranking supports the following mathematical operators:
+
, -
, *
, /
, (
, )
You can use the field names of custom attributes and these mathematical operators to define a custom ranking expression.
For example, consider that you have two custom attributes: CPC and freshness, where freshness is the number of days since the job was posted. You want to rank jobs by CPC and freshness, where CPC counts for 75% of the ranking and freshness counts for 25%. You can create a custom ranking expression as follows:
(0.75*CPC) + (0.25 *Freshness)
Code Sample
The following example creates a custom ranking expression using two
custom attributes, cpc_value
and freshness_value
. It sets the
custom ranking expression to (cpc_value / 2) - freshness_value
.
Go
To learn how to install and use the client library for CTS, see CTS client libraries. For more information, see the CTS Go API reference documentation.
To authenticate to CTS, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Java
To learn how to install and use the client library for CTS, see CTS client libraries. For more information, see the CTS Java API reference documentation.
To authenticate to CTS, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Node.js
To learn how to install and use the client library for CTS, see CTS client libraries. For more information, see the CTS Node.js API reference documentation.
To authenticate to CTS, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
To learn how to install and use the client library for CTS, see CTS client libraries. For more information, see the CTS Python API reference documentation.
To authenticate to CTS, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.