Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.


feat: Added a new KeywordMatchMode field to support more keyword ma…
Browse files Browse the repository at this point in the history
…tching options feat: Added more `DiversificationLevel` configuration options (#159)

* feat: Added a new `KeywordMatchMode` field to support more keyword matching options feat: Added more `DiversificationLevel` configuration options

PiperOrigin-RevId: 396667150

Source-Link: googleapis/googleapis@caad48d

Source-Link: googleapis/googleapis-gen@1ac7721
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWFjNzcyMWZiNmFhYmE4MjExYjI1YmEwYWRiOWE4ZWZmYjliYTFhMyJ9

* 🦉 Updates from OwlBot


Co-authored-by: Owl Bot <gcf-owl-bot[bot]>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Sep 16, 2021
1 parent 112e35d commit 4626497
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
55 changes: 54 additions & 1 deletion google/cloud/talent_v4/types/
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,18 @@ class SearchJobsRequest(proto.Message):
top of existing relevance score (determined by
API algorithm).
disable_keyword_match (bool):
This field is deprecated. Please use
going forward.
To migrate, disable_keyword_match set to false maps to
and disable_keyword_match set to true maps to
is set, this field is ignored.
Controls whether to disable exact keyword match on
Expand All @@ -492,6 +504,14 @@ class SearchJobsRequest(proto.Message):
recall of subsequent search requests.
Defaults to false.
keyword_match_mode (
Controls what keyword match options to use. If both
keyword_match_mode and disable_keyword_match are set,
keyword_match_mode will take precedence.
Defaults to
if no value is specified.

class SearchMode(proto.Enum):
Expand All @@ -510,10 +530,42 @@ class DiversificationLevel(proto.Enum):
representative job of the cluster is displayed to the job seeker
higher up in the results, with the other jobs being displayed
lower down in the results.
If you are using pageToken to page through the result set,
latency might be lower but we can't guarantee that all results
are returned. If you are using page offset, latency might be
higher but all results are returned.

class KeywordMatchMode(proto.Enum):
r"""Controls what keyword matching behavior the search has. When keyword
matching is enabled, a keyword match returns jobs that may not match
given category filters when there are matching keywords. For
example, for the query "program manager" with KeywordMatchMode set
to KEYWORD_MATCH_ALL, a job posting with the title "software
developer," which doesn't fall into "program manager" ontology, and
"program manager" appearing in its description will be surfaced.
For queries like "cloud" that don't contain title or location
specific ontology, jobs with "cloud" keyword matches are returned
regardless of this enum's value.
if company-specific globally matched custom field/attribute string
values are needed. Enabling keyword match improves recall of
subsequent search requests.

class CustomRankingInfo(proto.Message):
r"""Custom ranking information for
Expand Down Expand Up @@ -542,7 +594,7 @@ class CustomRankingInfo(proto.Message):
evaluated to a number.
Parenthesis are supported to adjust calculation precedence.
The expression must be < 100 characters in length.
The expression must be < 200 characters in length.
The expression is considered invalid for a job if the
expression references custom attributes that are not
Expand Down Expand Up @@ -595,6 +647,7 @@ class ImportanceLevel(proto.Enum):
proto.MESSAGE, number=14, message=CustomRankingInfo,
disable_keyword_match = proto.Field(proto.BOOL, number=16,)
keyword_match_mode = proto.Field(proto.ENUM, number=18, enum=KeywordMatchMode,)

class SearchJobsResponse(proto.Message):
Expand Down
4 changes: 2 additions & 2 deletions scripts/
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class talentCallTransformer(cst.CSTTransformer):
'list_companies': ('parent', 'page_token', 'page_size', 'require_open_jobs', ),
'list_jobs': ('parent', 'filter', 'page_token', 'page_size', 'job_view', ),
'list_tenants': ('parent', 'page_token', 'page_size', ),
'search_jobs': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', ),
'search_jobs_for_alert': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', ),
'search_jobs': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', 'keyword_match_mode', ),
'search_jobs_for_alert': ('parent', 'request_metadata', 'search_mode', 'job_query', 'enable_broadening', 'histogram_queries', 'job_view', 'offset', 'max_page_size', 'page_token', 'order_by', 'diversification_level', 'custom_ranking_info', 'disable_keyword_match', 'keyword_match_mode', ),
'update_company': ('company', 'update_mask', ),
'update_job': ('job', 'update_mask', ),
'update_tenant': ('tenant', 'update_mask', ),
Expand Down

0 comments on commit 4626497

Please sign in to comment.