You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否在Google CTS职位搜索中同时检索核心字段与Custom Attribute?

Extending Google CTS Job Search to Include Custom Attributes

Yes, this is absolutely achievable—you just need to adjust how your custom attributes are configured and how you structure your search queries. Here's what you need to know:

Why Your Current Search Only Hits Core Fields

Right now, your custom attributes are probably not marked as searchable in the CTS index. By default, custom attributes aren't included in text searches unless you explicitly tell CTS to index them for that purpose.

Step 1: Update Custom Attribute Configuration

When creating or updating job postings via the CTS API, add the searchable: true flag to every custom attribute you want included in search results. This tells CTS to index those fields alongside core data like Title, Description, etc.

Example job payload snippet:

{
  "title": "Senior Sales Manager",
  "description": "Lead regional sales operations...",
  "customAttributes": {
    "department": {
      "stringValues": ["Enterprise Sales"],
      "searchable": true,
      "filterable": true
    },
    "key_skill": {
      "stringValues": ["B2B Sales", "Client Negotiation"],
      "searchable": true
    }
  }
}

Once your custom attributes are marked as searchable, the default query parameter in your search request will automatically check all core fields AND all searchable custom attributes. So a search for "Sales" will return jobs where:

  • Any core field (Title, Description, Category, Location) matches "Sales", OR
  • Any searchable custom attribute (like department or key_skill) contains "Sales"

Example search request:

{
  "query": "Sales",
  "jobQuery": {
    "companies": ["projects/your-project/companies/your-company"]
  }
}

Advanced: Explicit Boolean Queries

If you need granular control (e.g., prioritize certain fields or exclude specific attributes), you can use boolean logic in the query parameter to explicitly reference custom attributes:

{
  "query": "Sales OR customAttribute:department:Sales OR customAttribute:key_skill:Sales",
  "jobQuery": {
    "companies": ["your-company-id"]
  }
}

Critical Reminder

Don't forget to re-index any existing job postings with the updated searchable flag—changes won't apply to old jobs unless you refresh their data in CTS.

内容的提问来源于stack exchange,提问作者Mittal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 08:15:57