feat(matching): rank with semantic embeddings and explain matches by evidence
This commit is contained in:
1 parent
facc1789b1
commit
24b64d698a
215 files changed
+16951
-327
No files matched your search
@@ -90,7 +90,7 @@ func validateCandidateCardAccessFields(input CandidateCardAccessInput, requireAc
|
||||
}
|
||||
switch input.Kind {
|
||||
case CandidateCardAccessCardViewed:
|
||||
if len(input.ContactFields) != 0 || len(input.ProjectionFields) > 6 {
|
||||
if len(input.ContactFields) != 0 || len(input.ProjectionFields) > maxCardViewedFields {
|
||||
return ErrInvalidCandidateCardAccess
|
||||
}
|
||||
seen := make(map[CardField]struct{}, len(input.ProjectionFields))
|
||||
@@ -116,10 +116,14 @@ func validateCandidateCardAccessFields(input CandidateCardAccessInput, requireAc
|
||||
return nil
|
||||
}
|
||||
|
||||
// maxCardViewedFields is the number of card groups that a view can return;
|
||||
// the CHECK of candidate_card_access_events allows the same.
|
||||
const maxCardViewedFields = 7
|
||||
|
||||
func candidateCardProjectionField(field CardField) bool {
|
||||
switch field {
|
||||
case CardFieldCategories, CardFieldStack, CardFieldExperience, CardFieldSelfAssessment,
|
||||
CardFieldWorkFormats, CardFieldSalaryCompatibility:
|
||||
CardFieldWorkFormats, CardFieldSalaryCompatibility, CardFieldProjects:
|
||||
return true
|
||||
case CardFieldSoftSkills, CardFieldLocation, CardFieldRelocation:
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user