Search Settings
Group search settings to create a custom search query and result template.
Customize which fields are searched, which are returned, and their overall weight.
The Search Settings template you create is then applied to every search query.
Supports Search Fields (Weights), Result Fields, and Boosts.
Note that result_fields changes will impact those set within the Result Settings UI. Be careful not to over-write your configuration!
Requires a Private API Key.
Show Settings
Show all Weights and Boosts applied to the search fields of an Engine.
GET request to national-parks-demo to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 3
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"id": {
"raw": {}
},
"description": {
"raw": {}
},
"nps_link": {
"raw": {}
},
"states": {
"raw": {}
},
"title": {
"raw": {}
},
"visitors": {
"raw": {}
},
"world_heritage_site": {
"raw": {}
},
"location": {
"raw": {}
},
"acres": {
"raw": {}
},
"square_km": {
"raw": {}
},
"date_established": {
"raw": {}
}
},
"boosts": {}
}
GET request to national-parks-demo to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 3
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"id": {
"raw": {}
},
"description": {
"raw": {}
},
"nps_link": {
"raw": {}
},
"states": {
"raw": {}
},
"title": {
"raw": {}
},
"visitors": {
"raw": {}
},
"world_heritage_site": {
"raw": {}
},
"location": {
"raw": {}
},
"acres": {
"raw": {}
},
"square_km": {
"raw": {}
},
"date_established": {
"raw": {}
}
},
"boosts": {}
}
GET request to national-parks-demo to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 3
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"id": {
"raw": {}
},
"description": {
"raw": {}
},
"nps_link": {
"raw": {}
},
"states": {
"raw": {}
},
"title": {
"raw": {}
},
"visitors": {
"raw": {}
},
"world_heritage_site": {
"raw": {}
},
"location": {
"raw": {}
},
"acres": {
"raw": {}
},
"square_km": {
"raw": {}
},
"date_established": {
"raw": {}
}
},
"boosts": {}
}
GET request to national-parks-demo to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 3
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"id": {
"raw": {}
},
"description": {
"raw": {}
},
"nps_link": {
"raw": {}
},
"states": {
"raw": {}
},
"title": {
"raw": {}
},
"visitors": {
"raw": {}
},
"world_heritage_site": {
"raw": {}
},
"location": {
"raw": {}
},
"acres": {
"raw": {}
},
"square_km": {
"raw": {}
},
"date_established": {
"raw": {}
}
},
"boosts": {}
}
GET request to national-parks-demo to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 3
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"id": {
"raw": {}
},
"description": {
"raw": {}
},
"nps_link": {
"raw": {}
},
"states": {
"raw": {}
},
"title": {
"raw": {}
},
"visitors": {
"raw": {}
},
"world_heritage_site": {
"raw": {}
},
"location": {
"raw": {}
},
"acres": {
"raw": {}
},
"square_km": {
"raw": {}
},
"date_established": {
"raw": {}
}
},
"boosts": {}
}
GET request to national-parks-demo to reveal Weight and Boost values.
curl -X GET 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 3
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"id": {
"raw": {}
},
"description": {
"raw": {}
},
"nps_link": {
"raw": {}
},
"states": {
"raw": {}
},
"title": {
"raw": {}
},
"visitors": {
"raw": {}
},
"world_heritage_site": {
"raw": {}
},
"location": {
"raw": {}
},
"acres": {
"raw": {}
},
"square_km": {
"raw": {}
},
"date_established": {
"raw": {}
}
},
"boosts": {}
}
Update Settings
Create default search settings.
Impacts each search query and the results that are returned.
Pass Search Field (Weights), Result Field, and Boost objects using their usual parameters.
Note: Removing fields from result_fields means that those fields are not returned in results.
PUT request to national-parks-demo to select which fields to search, calibrate the existing Weight, and apply Boost values. Returns only the "title", "description", and "states" fields, with some snippets.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 3
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"title": {
"snippet": {
"size": 20,
"fallback": true
}
},
"description": {
"raw": {
"size": 200
},
"snippet": {
"size": 100
}
},
"states": {
"raw" : {},
"snippet": {
"size": 20,
"fallback": true
}
}
},
"boosts": {
"world_heritage_site": [
{
"type": "value",
"factor": 9.5,
"value": [
"true"
]
}
]
}
}'
{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"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"
]
}
]
}
}
PUT request to national-parks-demo to select which fields to search, calibrate the existing Weight, and apply Boost values. Returns only the "title", "description", and "states" fields, with some snippets.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 3
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"title": {
"snippet": {
"size": 20,
"fallback": true
}
},
"description": {
"raw": {
"size": 200
},
"snippet": {
"size": 100
}
},
"states": {
"raw" : {},
"snippet": {
"size": 20,
"fallback": true
}
}
},
"boosts": {
"world_heritage_site": [
{
"type": "value",
"factor": 9.5,
"value": [
"true"
]
}
]
}
}'
{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"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"
]
}
]
}
}
PUT request to national-parks-demo to select which fields to search, calibrate the existing Weight, and apply Boost values. Returns only the "title", "description", and "states" fields, with some snippets.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 3
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"title": {
"snippet": {
"size": 20,
"fallback": true
}
},
"description": {
"raw": {
"size": 200
},
"snippet": {
"size": 100
}
},
"states": {
"raw" : {},
"snippet": {
"size": 20,
"fallback": true
}
}
},
"boosts": {
"world_heritage_site": [
{
"type": "value",
"factor": 9.5,
"value": [
"true"
]
}
]
}
}'
{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"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"
]
}
]
}
}
PUT request to national-parks-demo to select which fields to search, calibrate the existing Weight, and apply Boost values. Returns only the "title", "description", and "states" fields, with some snippets.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 3
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"title": {
"snippet": {
"size": 20,
"fallback": true
}
},
"description": {
"raw": {
"size": 200
},
"snippet": {
"size": 100
}
},
"states": {
"raw" : {},
"snippet": {
"size": 20,
"fallback": true
}
}
},
"boosts": {
"world_heritage_site": [
{
"type": "value",
"factor": 9.5,
"value": [
"true"
]
}
]
}
}'
{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"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"
]
}
]
}
}
PUT request to national-parks-demo to select which fields to search, calibrate the existing Weight, and apply Boost values. Returns only the "title", "description", and "states" fields, with some snippets.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 3
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"title": {
"snippet": {
"size": 20,
"fallback": true
}
},
"description": {
"raw": {
"size": 200
},
"snippet": {
"size": 100
}
},
"states": {
"raw" : {},
"snippet": {
"size": 20,
"fallback": true
}
}
},
"boosts": {
"world_heritage_site": [
{
"type": "value",
"factor": 9.5,
"value": [
"true"
]
}
]
}
}'
{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"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"
]
}
]
}
}
PUT request to national-parks-demo to select which fields to search, calibrate the existing Weight, and apply Boost values. Returns only the "title", "description", and "states" fields, with some snippets.
curl -X PUT 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx' \
-d '{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 3
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"result_fields": {
"title": {
"snippet": {
"size": 20,
"fallback": true
}
},
"description": {
"raw": {
"size": 200
},
"snippet": {
"size": 100
}
},
"states": {
"raw" : {},
"snippet": {
"size": 20,
"fallback": true
}
}
},
"boosts": {
"world_heritage_site": [
{
"type": "value",
"factor": 9.5,
"value": [
"true"
]
}
]
}
}'
{
"search_fields": {
"description": {
"weight": 9.2
},
"nps_link": {
"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 request tonational-parks-demo to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"boosts": {}
}
POST request tonational-parks-demo to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"boosts": {}
}
POST request tonational-parks-demo to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"boosts": {}
}
POST request tonational-parks-demo to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"boosts": {}
}
POST request tonational-parks-demo to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"weight": 1
},
"states": {
"weight": 1
},
"title": {
"weight": 1
},
"world_heritage_site": {
"weight": 1
},
"id": {
"weight": 1
}
},
"boosts": {}
}
POST request tonational-parks-demo to reset all Weight and Boost settings.
curl -X POST 'https://host-2376rb.api.swiftype.com/api/as/v1/engines/national-parks-demo/search_settings/reset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer private-xxxxxxxxxxxxxxxx'
{
"search_fields": {
"description": {
"weight": 1
},
"nps_link": {
"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!