Skip to content

Commit caad48d

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added a new KeywordMatchMode field to support more keyword matching options
feat: Added more `DiversificationLevel` configuration options PiperOrigin-RevId: 396667150
1 parent c53262d commit caad48d

12 files changed

Lines changed: 84 additions & 18 deletions

google/cloud/talent/v4/common.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/company.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/company_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/completion_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/event.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/event_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/filters.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/histogram.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/job.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/talent/v4/job_service.proto

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -383,7 +383,7 @@ message SearchJobsRequest {
383383
// integer/double value or an expression that can be evaluated to a number.
384384
//
385385
// Parenthesis are supported to adjust calculation precedence. The
386-
// expression must be < 100 characters in length.
386+
// expression must be < 200 characters in length.
387387
//
388388
// The expression is considered invalid for a job if the expression
389389
// references custom attributes that are not populated on the job or if the
@@ -420,6 +420,11 @@ message SearchJobsRequest {
420420
// clustered so that only one representative job of the cluster is
421421
// displayed to the job seeker higher up in the results, with the other jobs
422422
// being displayed lower down in the results.
423+
//
424+
// If you are using pageToken to page through the result set,
425+
// latency might be lower but we can't guarantee that all results are
426+
// returned. If you are using page offset, latency might be higher but all
427+
// results are returned.
423428
enum DiversificationLevel {
424429
// The diversification level isn't specified.
425430
DIVERSIFICATION_LEVEL_UNSPECIFIED = 0;
@@ -431,11 +436,57 @@ message SearchJobsRequest {
431436

432437
// Default diversifying behavior. The result list is ordered so that
433438
// highly similar results are pushed to the end of the last page of search
434-
// results. If you are using pageToken to page through the result set,
435-
// latency might be lower but we can't guarantee that all results are
436-
// returned. If you are using page offset, latency might be higher but all
437-
// results are returned.
439+
// results.
438440
SIMPLE = 2;
441+
442+
// Only one job from the same company will be shown at once, other jobs
443+
// under same company are pushed to the end of the last page of search
444+
// result.
445+
ONE_PER_COMPANY = 3;
446+
447+
// Similar to ONE_PER_COMPANY, but it allows at most two jobs in the
448+
// same company to be shown at once, the other jobs under same company are
449+
// pushed to the end of the last page of search result.
450+
TWO_PER_COMPANY = 4;
451+
452+
// The result list is ordered such that somewhat similar results are pushed
453+
// to the end of the last page of the search results. This option is
454+
// recommended if SIMPLE diversification does not diversify enough.
455+
DIVERSIFY_BY_LOOSER_SIMILARITY = 5;
456+
}
457+
458+
// Controls what keyword matching behavior the search has. When keyword
459+
// matching is enabled, a keyword match returns jobs that may not match given
460+
// category filters when there are matching keywords. For example, for the
461+
// query "program manager" with KeywordMatchMode set to KEYWORD_MATCH_ALL, a
462+
// job posting with the title "software developer," which doesn't fall into
463+
// "program manager" ontology, and "program manager" appearing in its
464+
// description will be surfaced.
465+
//
466+
// For queries like "cloud" that don't contain title or
467+
// location specific ontology, jobs with "cloud" keyword matches are returned
468+
// regardless of this enum's value.
469+
//
470+
// Use [Company.keyword_searchable_job_custom_attributes][google.cloud.talent.v4.Company.keyword_searchable_job_custom_attributes] if
471+
// company-specific globally matched custom field/attribute string values are
472+
// needed. Enabling keyword match improves recall of subsequent search
473+
// requests.
474+
enum KeywordMatchMode {
475+
// The keyword match option isn't specified. Defaults to
476+
// [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] behavior.
477+
KEYWORD_MATCH_MODE_UNSPECIFIED = 0;
478+
479+
// Disables keyword matching.
480+
KEYWORD_MATCH_DISABLED = 1;
481+
482+
// Enable keyword matching over [Job.title][google.cloud.talent.v4.Job.title],
483+
// [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
484+
// [Job.qualifications][google.cloud.talent.v4.Job.qualifications], and keyword searchable [Job.custom_attributes][google.cloud.talent.v4.Job.custom_attributes]
485+
// fields.
486+
KEYWORD_MATCH_ALL = 2;
487+
488+
// Only enable keyword matching over [Job.title][google.cloud.talent.v4.Job.title].
489+
KEYWORD_MATCH_TITLE_ONLY = 3;
439490
}
440491

441492
// Required. The resource name of the tenant to search within.
@@ -658,6 +709,14 @@ message SearchJobsRequest {
658709
// score (determined by API algorithm).
659710
CustomRankingInfo custom_ranking_info = 14;
660711

712+
// This field is deprecated. Please use
713+
// [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] going forward.
714+
//
715+
// To migrate, disable_keyword_match set to false maps to
716+
// [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL], and disable_keyword_match set to
717+
// true maps to [KeywordMatchMode.KEYWORD_MATCH_DISABLED][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_DISABLED]. If
718+
// [SearchJobsRequest.keyword_match_mode][google.cloud.talent.v4.SearchJobsRequest.keyword_match_mode] is set, this field is ignored.
719+
//
661720
// Controls whether to disable exact keyword match on [Job.title][google.cloud.talent.v4.Job.title],
662721
// [Job.description][google.cloud.talent.v4.Job.description], [Job.company_display_name][google.cloud.talent.v4.Job.company_display_name], [Job.addresses][google.cloud.talent.v4.Job.addresses],
663722
// [Job.qualifications][google.cloud.talent.v4.Job.qualifications]. When disable keyword match is turned off, a
@@ -677,7 +736,14 @@ message SearchJobsRequest {
677736
// requests.
678737
//
679738
// Defaults to false.
680-
bool disable_keyword_match = 16;
739+
bool disable_keyword_match = 16 [deprecated = true];
740+
741+
// Controls what keyword match options to use. If both keyword_match_mode and
742+
// disable_keyword_match are set, keyword_match_mode will take precedence.
743+
//
744+
// Defaults to [KeywordMatchMode.KEYWORD_MATCH_ALL][google.cloud.talent.v4.SearchJobsRequest.KeywordMatchMode.KEYWORD_MATCH_ALL] if no value
745+
// is specified.
746+
KeywordMatchMode keyword_match_mode = 18;
681747
}
682748

683749
// Response for SearchJob method.

0 commit comments

Comments
 (0)