V10.399 demote named variant catalog alerts
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s
This commit is contained in:
@@ -503,6 +503,8 @@ VARIANT_OPTION_COLOR_WORDS = {
|
||||
"梔子花",
|
||||
"白麝香",
|
||||
"黑麝香",
|
||||
"清新花園",
|
||||
"寶貝粉香",
|
||||
"青檸羅勒",
|
||||
"炭木香",
|
||||
"無花果",
|
||||
@@ -1630,6 +1632,7 @@ def _build_evidence_flags(
|
||||
flags.append("catalog_count_omission")
|
||||
for reason in (
|
||||
"unit_comparable",
|
||||
"variant_selection_review",
|
||||
"variant_option_conflict",
|
||||
"variant_descriptor_conflict",
|
||||
"count_conflict",
|
||||
@@ -1682,7 +1685,7 @@ def _classify_match_quality(
|
||||
and (direct_spec_evidence or (shared_anchor and token_score >= 0.62 and sequence_score >= 0.58))
|
||||
)
|
||||
if strong_identity_evidence and not catalog_count_omission:
|
||||
if multi_component_pair:
|
||||
if multi_component_pair or "variant_selection_review" in reason_set:
|
||||
return "exact", "manual_review", "identity_review"
|
||||
return "exact", "total_price", "price_alert_exact"
|
||||
|
||||
@@ -1760,6 +1763,9 @@ def score_marketplace_match(
|
||||
variant_option_conflict = _has_explicit_variant_option_conflict(left, right, shared_anchor)
|
||||
if variant_option_conflict:
|
||||
reasons.append("variant_option_conflict")
|
||||
variant_selection_review = _has_named_variant_selection_review(left, right, shared_anchor)
|
||||
if variant_selection_review:
|
||||
reasons.append("variant_selection_review")
|
||||
|
||||
hard_veto = brand_conflict or spec_conflict
|
||||
if bundle_offer_conflict:
|
||||
@@ -2936,6 +2942,24 @@ def _has_explicit_variant_option_conflict(
|
||||
return True
|
||||
|
||||
|
||||
def _has_named_variant_selection_review(
|
||||
left: ProductIdentity,
|
||||
right: ProductIdentity,
|
||||
shared_anchor: str,
|
||||
) -> bool:
|
||||
left_options = _explicit_variant_option_tokens(left)
|
||||
right_options = _explicit_variant_option_tokens(right)
|
||||
if bool(left_options) == bool(right_options):
|
||||
return False
|
||||
|
||||
option_identity = left if left_options else right
|
||||
named_options = {option for option in (left_options or right_options) if not option.isdigit()}
|
||||
if len(named_options) < 2:
|
||||
return False
|
||||
text = option_identity.searchable_name
|
||||
return _is_multi_variant_catalog_listing(option_identity) or bool(re.search(r"[//、,&&]", text))
|
||||
|
||||
|
||||
def _search_core_score(token: str, all_tokens: set[str]) -> tuple[int, int, str]:
|
||||
cleaned = _clean_search_phrase(token)
|
||||
if not cleaned:
|
||||
|
||||
Reference in New Issue
Block a user