Resources
A resource is data that rides along with a result but is never searched or filtered — a poster URL, a deep link, a price, an external ID.
- Returned in every search response.
- Never indexed, so it doesn't bloat or slow the search.
The three field types, side by side:
| Field type | Search it? | Filter by it? | Returned? | Good for |
|---|---|---|---|---|
| Searchable | Yes | No | Yes | title, plot, tagline |
| Facet | No | Yes | Yes | genre, year, rating |
| Resource | No | No | Yes | poster URL, deep link, ID |
Add a poster field
On the movies list, choose Fields then Add Resource Field, and name it poster_url.
Edit each film and paste in its poster address.
It comes back with every result
Search as normal. The poster is in the response, ready for an <img> tag:
GET https://api.searchstack.dev/search/Demo/movies/1?query=matrix
X-API-Key: {your key}
{
"results": [
{
"name": "The Matrix",
"fields": {
"genre": "Sci-Fi",
"year": 1999,
"poster_url": "https://image.tmdb.org/t/p/w500/f89U3ADr1oiB1s9GkdPOEpXUk5H.jpg"
}
}
],
"count": 1,
"total_count": 1
}
Rule of thumb: if a visitor might type it, searchable; if they might click it to narrow results, a facet; if your app just displays it, a resource.
More on resource fields and how the field types differ: the Fields reference.
Next: Uploading »
Load a whole catalogue in one file.