FilterSpec is the query language for filtering employees. It provides a simple, declarative way to build complex searches without writing raw Elasticsearch queries.
{ textAny?: [], // Match ANY of these text terms (OR) textAll?: [], // Match ALL of these text terms (AND) range?: [], // Numeric range filters termsAny?: [], // Exact match ANY of these values (OR) termsAll?: [], // Exact match ALL of these values (AND) exists?: [], // Field must exist notExists?: [] // Field must NOT exist}
For fuzzy/partial matching on free-text fields like job titles, headlines, descriptions.
// Match people with "engineer" OR "developer" in job_titletextAny: [{ field: "job_title", terms: ["engineer", "developer"] }];// Match people with BOTH "senior" AND "engineer" in job_titletextAll: [{ field: "job_title", terms: ["senior", "engineer"] }];
Best for:job_title, headline, description, skills, experience.title, experience.description
For exact matching on discrete/enum fields. Required for all enum-backed fields.
// Match people in Engineering OR Sales departmentstermsAny: [{ field: "department", values: ["Engineering and Technical", "Sales"] }];// Match by company IDtermsAny: [{ field: "experience.company_id", values: [12345] }];
Best for:department, management_level, location_regions, experience.company_id, experience.company_industry
// Must have a profile pictureexists: [{ field: "picture_url" }];// Currently employed (no end date on current role)notExists: [{ field: "experience.date_to" }];