search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

Search Settings

Learn about Weights and Boosts within the Relevance Tuning guide.


Alter search settings using one API endpoint.

Supports Weights and Boosts.

Requires a Private API Key.

Show Settings

Show all Weights and Boosts applied to the search fields of an Engine.

GET /api/as/v1/engines/:engine_slug/search_settings
Example - A GET request to sample-engine to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
{
  "search_fields": {
    "description": {
      "weight": 6.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 5.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A GET request to sample-engine to reveal Weight and Boost values.
No Java example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Java example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 6.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 5.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A GET request to sample-engine to reveal Weight and Boost values.
No Node example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Node example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 6.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 5.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A GET request to sample-engine to reveal Weight and Boost values.
No Ruby example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Ruby example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 6.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 5.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A GET request to sample-engine to reveal Weight and Boost values.
No Python example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Python example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 6.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 5.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A GET request to sample-engine to reveal Weight and Boost values.
No Javascript example available, showing cURL
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Javascript example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 6.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 5.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Update Settings

Update Weights or Boosts for search fields of an Engine.

PUT /api/as/v1/engines/:engine_slug/search_settings
Example - A PUT request to sample-engine to increase the existing Weight and Boost values.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}'
Example Response
{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A PUT request to sample-engine to increase the existing Weight and Boost values.
No Java example available, showing cURL
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}'
Example Response
No Java example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A PUT request to sample-engine to increase the existing Weight and Boost values.
No Node example available, showing cURL
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}'
Example Response
No Node example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A PUT request to sample-engine to increase the existing Weight and Boost values.
No Ruby example available, showing cURL
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}'
Example Response
No Ruby example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A PUT request to sample-engine to increase the existing Weight and Boost values.
No Python example available, showing cURL
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}'
Example Response
No Python example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Example - A PUT request to sample-engine to increase the existing Weight and Boost values.
No Javascript example available, showing cURL
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}'
Example Response
No Javascript example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 9.2
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 3
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {
    "world_heritage_site": [
      {
        "type": "value",
        "factor": 9.5,
        "value": [
          "true"
        ]
      }
    ]
  }
}

Reset Settings

Reset your Engine to default values.

Warning: This means your settings are wiped! Back them up!

POST /api/as/v1/engines/:engine_slug/search_settings/reset
Example - A POST request tosample-engine to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tosample-engine to reset all Weight and Boost settings.
No Java example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Java example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tosample-engine to reset all Weight and Boost settings.
No Node example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Node example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tosample-engine to reset all Weight and Boost settings.
No Ruby example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Ruby example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tosample-engine to reset all Weight and Boost settings.
No Python example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Python example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tosample-engine to reset all Weight and Boost settings.
No Javascript example available, showing cURL
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/sample-engine/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
Example Response
No Javascript example available, showing cURL
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "location": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}


Stuck? Looking for help? Contact support or check out the App Search community forum!