Loading...

Make the plot searchable

Real people search for what they remember: “the one about dreams”. This step fixes that.

What a searchable field is

A searchable field is text you want search to look inside. Every list starts with one, name. Add more and search reads all of them at once, matching and ranking on every word — so a plot field makes “dreams” find Inception.

Add the plot field

Open the movies list, choose Fields, then Add Searchable Field.

The Fields menu open, showing Add Searchable Field

Name it plot and add it. The field is live immediately.

The Add Searchable Field dialog with the name 'plot'
  • Your existing films are untouched; they just have an empty plot until you fill it in.
  • Adding a field does not create a new API version — there's a step on that later.

Fill in the plots

Open a film with Edit, add a sentence to the new plot box, and save.

Editing Inception to add its plot text

Do that for a few films and the list shows the plot alongside each name:

The movies list now showing a populated plot column

Search across both fields

Search now reads name and plot together, so dream finds Inception through its plot:

GET https://api.searchstack.dev/search/Demo/movies/1?query=dream
X-API-Key: {your key}

The custom fields you added ride along in each result under fields:

{
  "results": [
    {
      "name": "Inception",
      "fields": {
        "plot": "A thief who enters people's dreams to steal secrets is hired to plant an idea instead."
      }
    }
  ],
  "count": 1,
  "total_count": 1
}

Add as many as your data warrants: a tagline, a director, a list of actors.

Go deeper: Fields in the reference.

Top