Commit 1090ad4e authored by Vũ Hoàng Anh's avatar Vũ Hoàng Anh

fix: disable strict filters (sleeve, style, fitting, neckline, material,...

fix: disable strict filters (sleeve, style, fitting, neckline, material, season) - only keep name, gender, age, color
parent 37d6b790
......@@ -146,65 +146,13 @@ async def _execute_single_search(db, item: SearchItem, query_vector: list[float]
logger.info("🎨 Color filter: %s → %s products (Matched: %s)",
item.master_color, len(products), info.get("matched_value"))
# 2. SLEEVE
if item.form_sleeve and products:
products, info = filter_with_priority(
products, item.form_sleeve, "form_sleeve", SLEEVE_MAP, "Dáng tay"
)
if info.get("fallback_used") or info.get("matched_value"):
all_filter_info["sleeve"] = info
logger.info("👕 Sleeve filter: %s → %s products (Matched: %s)",
item.form_sleeve, len(products), info.get("matched_value"))
# 3. STYLE
if item.style and products:
products, info = filter_with_priority(
products, item.style, "style", STYLE_MAP, "Phong cách"
)
if info.get("fallback_used") or info.get("matched_value"):
all_filter_info["style"] = info
logger.info("✨ Style filter: %s → %s products (Matched: %s)",
item.style, len(products), info.get("matched_value"))
# 4. FITTING
if item.fitting and products:
products, info = filter_with_priority(
products, item.fitting, "fitting", FITTING_MAP, "Dáng đồ"
)
if info.get("fallback_used") or info.get("matched_value"):
all_filter_info["fitting"] = info
logger.info(" Fitting filter: %s → %s products (Matched: %s)",
item.fitting, len(products), info.get("matched_value"))
# 5. NECKLINE
if item.form_neckline and products:
products, info = filter_with_priority(
products, item.form_neckline, "form_neckline", NECKLINE_MAP, "Dáng cổ"
)
if info.get("fallback_used") or info.get("matched_value"):
all_filter_info["neckline"] = info
logger.info("👔 Neckline filter: %s → %s products (Matched: %s)",
item.form_neckline, len(products), info.get("matched_value"))
# 6. MATERIAL
if item.material_group and products:
products, info = filter_with_priority(
products, item.material_group, "material_group", MATERIAL_MAP, "Chất liệu"
)
if info.get("fallback_used") or info.get("matched_value"):
all_filter_info["material"] = info
logger.info("🧵 Material filter: %s → %s products (Matched: %s)",
item.material_group, len(products), info.get("matched_value"))
# 7. SEASON
if item.season and products:
products, info = filter_with_priority(
products, item.season, "season", SEASON_MAP, "Mùa"
)
if info.get("fallback_used") or info.get("matched_value"):
all_filter_info["season"] = info
logger.info("🌤️ Season filter: %s → %s products (Matched: %s)",
item.season, len(products), info.get("matched_value"))
# === DISABLED FILTERS (chỉ giữ name, gender, age, color) ===
# 2. SLEEVE - DISABLED
# 3. STYLE - DISABLED
# 4. FITTING - DISABLED
# 5. NECKLINE - DISABLED
# 6. MATERIAL - DISABLED
# 7. SEASON - DISABLED
# Combine filter info
filter_info = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment