Skip to content

Filter the board by classified place and by company - #1476

Merged
kensac merged 1 commit into
mainfrom
board-place-company-filters
Nov 18, 2026
Merged

kensac merged 1 commit into
mainfrom
board-place-company-filters

Conversation

@kensac

@kensac kensac commented Nov 18, 2026

Copy link
Copy Markdown
Owner

The board's only location filter was a substring match on the raw location text ("Location text contains ..."), even though 99.8% of the board's postings (2,332 of 2,348 on 2026-11-18) have every location classified into country, region and city in locations.

What changes

  • Column filters gain any_of and none_of (a JSON array in value): OR within a condition, AND across conditions, none_of as the exclusion. Text fields compare case-insensitively and whole; company stays on lower(btrim(company)), which idx_jobs_company_key serves.
  • New place field. A pick is remote or COUNTRY[/REGION[/CITY]]. It matches through the same join as the board criteria (locations.text = btrim(loc)) and jsonb containment on locations.places, so US takes every region and city in the US. A location not yet classified matches no pick.
  • with_facets=true now also returns facets.place and facets.company, counted under every other condition except the field's own, so a selected pick never hides its siblings.
  • docs/agents/frontend.md states the contract.

Measured against production (user 1, read-only)

  • Place facet: 444 picks, 0.62 s. Company facet: 696 companies, 0.15 s. Both only on the first window of a dataset.
  • US/CA or remote: 1,099 rows, 0.29 s. US/NY/New York: 274 rows, matching its facet count. Not US: 57 rows.

Skipped: role family, career stage and requirement filters. job_profiles covers 20% of the board and job_requirements 10%, so a filter on them would hide most postings for lack of data rather than for not matching. Terms are empty on every board row.

Tests

tests/test_board_column_filters.py: country, region, city and remote picks; exclusion; AND across place and company; facets not narrowed by their own field; malformed lists refused with 422. Related suites (board, catalog, openapi): 82 passed.

The board's location filter was a substring match on the raw text, though
every location is classified into country, region and city. Column filters
gain any_of and none_of over a JSON list, and a place field that matches
locations.places by containment, so a country takes its regions and cities.
The list's facets count places and companies under every other condition.
@kensac
kensac force-pushed the board-place-company-filters branch from 5d1bf7e to 766ef84 Compare November 18, 2026 19:31
@kensac
kensac merged commit 6521b1d into main Nov 18, 2026
13 checks passed
@kensac
kensac deleted the board-place-company-filters branch November 18, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant