Cloud Talent Solution allows you to get a histogram representation of the number of
jobs associated with a given search. A histogram search returns a count of all jobs
that match a particular query, broken down by the requested
SearchMode
.
For example, a histogram search could return the number of jobs per employment
type (full-time, part-time, and so on) that exist in Mountain View, CA.
Histograms are generally run in parallel with a search call, using the same
JobQuery
and the same requestMetadata
.
The histogram is defined by the histogramQuery
field, a single string expression. For details on the functions available for
histogram queries, see the histogramQuery
documentation.
Retrieving a histogram
The following code sample returns histogram results:
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
For more on installing and creating a Cloud Talent Solution client, see Cloud Talent Solution Client Libraries.
Python
For more on installing and creating a Cloud Talent Solution client, see Cloud Talent Solution Client Libraries.
Relevance thresholding
Histogram requests do not use relevance thresholding. To ensure that the counts
are consistent between a histogram search and an identical job search,
disableKeywordMatch
in the job search must be false
.