Developers · Data
Selecting Fields Available for Search
Last updated 1 November 2026
Search only the fields you choose, and rank matches by field with priority.
By default a search looks at every indexed field of a record. Often you want less: a product search that looks at the name and the description, but not at internal notes. Name the fields in the fields option of fulltext, and give each one a priority so matches in the most important field rank first.
Choose the fields
app/graphql/products/search.graphql
query search_products($q: String!) {
records(
per_page: 20
filter: {
table: { value: "product" }
fulltext: {
keyword: $q
fields: [
{ name: "properties.name", priority: 3 }
{ name: "properties.description", priority: 1 }
]
}
}
) {
results { id name: property(name: "name") }
}
}| Field option | Meaning |
|---|---|
name | The field to search. For records, properties. and the property name |
priority | Relevance weight, 1 by default. Higher means matches in this field rank higher |
The .raw suffix | properties.title.raw matches the exact, unprocessed value |
Example on a live instance
Query
{
records(
per_page: 3
filter: {
table: { value: "modules/website/developers_guide" }
fulltext: {
keyword: "flash"
fields: [{ name: "properties.title", priority: 2 }]
match_type: STARTS_WITH
}
}
) {
total_entries
results { slug: property(name: "slug") }
}
}Response on the docs instance
{
"data": {
"records": {
"total_entries": 1,
"results": [{ "slug": "form-flash-messages" }]
}
}
}This ran read-only on the docs.insites.io instance on 1 November 2026. It searched only page titles, so a page that mentions flash messages in its body but not its title does not appear.
Exact matches on users
For an exact lookup rather than a search, filter instead. This returns users whose first name is exactly John:
query get_owners {
users(per_page: 20, filter: { first_name: { value: "John" } }) {
results { first_name }
}
}Common mistakes
- Leaving out
properties.before a record field name. - Giving every field the same priority and expecting the name to rank first.
- Using a search where an exact filter fits. A filter is faster and returns exactly what matches.