Add in-place role-fix for existing «پزشک عمومی»-mislabeled listings
RecorrectDoctorRolesAsync (+ admin button «اصلاح نقش»): re-runs the keyword parser + doctor-role guard over the stored text of existing aggregated listings currently labeled «پزشک عمومی», and corrects RoleId + the generic title in place when the text actually names a more specific role (dentist, «متخصص», lab, …). No AI call, no delete/recreate — IDs and indexed URLs unchanged, only GP-labeled rows touched. Cleans up the dentist/ENT/«متخصص غدد» mislabels already published. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -157,6 +157,15 @@ public class IndexModel : PageModel
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
/// <summary>Fix existing aggregated listings the AI mislabeled «پزشک عمومی» (dentist/specialist/…)
|
||||
/// in place from their stored text — no AI, no ID/URL change.</summary>
|
||||
public async Task<IActionResult> OnPostRecorrectRolesAsync()
|
||||
{
|
||||
var n = await _ingest.RecorrectDoctorRolesAsync();
|
||||
IngestMessage = $"اصلاح نقش: {n} آگهیِ «پزشک عمومی» که در واقع نقش دیگری بود (دندانپزشک، متخصص و …) از روی متن آگهی اصلاح شد. بدون تغییر شناسه یا آدرس صفحه.";
|
||||
return RedirectToPage();
|
||||
}
|
||||
|
||||
private async Task LoadAsync()
|
||||
{
|
||||
Queue = await _db.RawListings
|
||||
|
||||
Reference in New Issue
Block a user