99e5cfb76b
Closes #41 - Add RequireKeywordInAnchor per-provider flag (default true); set false for ejobs.ro and bestjobs.eu so Stage 2 anchor-text filter is skipped — their search URL already filters by relevance server-side - Update AI system prompts (en + ro) to extract concise job-board-friendly keywords (role title + key tech, not abstract concepts) and candidate location - Propagate location through JobMatchResponse -> CreateJobSearchTokenRequest -> JobSearchTokenEntity -> JobSearchSessionEntity - Add {location} and {location-slug} substitution in HtmlJobSearcher - Update provider SearchUrlTemplates to include location: ejobs.ro: /locuri-de-munca/{location-slug}?q={keywords} bestjobs.eu: /ro/locuri-de-munca-in-{location-slug}?keywords={keywords} linkedin.com: ?keywords={keywords}&location={location} - Three new migrations: AddRequireKeywordInAnchorAndLocation, ImproveKeywordsAndAddLocation, AddLocationToProviders Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
75 lines
2.4 KiB
C#
75 lines
2.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace CvSearch.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddRequireKeywordInAnchorAndLocation : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Location",
|
|
schema: "cvSearch",
|
|
table: "JobSearchTokens",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Location",
|
|
schema: "cvSearch",
|
|
table: "JobSearchSessions",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "RequireKeywordInAnchor",
|
|
schema: "cvSearch",
|
|
table: "JobProviders",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: true);
|
|
|
|
// ejobs.ro (Id=1) and bestjobs.eu (Id=2) do server-side keyword filtering via their
|
|
// search URL — the Stage 2 anchor-text filter rejects all Romanian job titles because
|
|
// they rarely contain abstract LLM keywords.
|
|
migrationBuilder.UpdateData(
|
|
schema: "cvSearch",
|
|
table: "JobProviders",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "RequireKeywordInAnchor",
|
|
value: false);
|
|
|
|
migrationBuilder.UpdateData(
|
|
schema: "cvSearch",
|
|
table: "JobProviders",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "RequireKeywordInAnchor",
|
|
value: false);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Location",
|
|
schema: "cvSearch",
|
|
table: "JobSearchTokens");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Location",
|
|
schema: "cvSearch",
|
|
table: "JobSearchSessions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RequireKeywordInAnchor",
|
|
schema: "cvSearch",
|
|
table: "JobProviders");
|
|
}
|
|
}
|
|
}
|