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

Checkout the Relevance Tuning Guide to learn Weights and Boosts, and the Result Settings Guide for Result Fields.


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 /api/as/v1/engines/{ENGINE_NAME}/search_settings
Example - A 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'
Example Response
{
  "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": {}
}

Example - A GET request to national-parks-demo 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/national-parks-demo/search_settings' \
-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
    },
    "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": {}
}

Example - A GET request to national-parks-demo 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/national-parks-demo/search_settings' \
-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
    },
    "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": {}
}

Example - A GET request to national-parks-demo 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/national-parks-demo/search_settings' \
-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
    },
    "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": {}
}

Example - A GET request to national-parks-demo 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/national-parks-demo/search_settings' \
-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
    },
    "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": {}
}

Example - A GET request to national-parks-demo 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/national-parks-demo/search_settings' \
-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
    },
    "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 /api/as/v1/engines/{ENGINE_NAME}/search_settings
Example - A 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"
        ]
      }
    ]
  }
}'
Example Response
{
  "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"
        ]
      }
    ]
  }
}

Example - A 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.
No Java example available, showing cURL
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"
        ]
      }
    ]
  }
}'
Example Response
No Java example available, showing cURL
{
  "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"
        ]
      }
    ]
  }
}

Example - A 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.
No Node example available, showing cURL
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"
        ]
      }
    ]
  }
}'
Example Response
No Node example available, showing cURL
{
  "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"
        ]
      }
    ]
  }
}

Example - A 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.
No Ruby example available, showing cURL
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"
        ]
      }
    ]
  }
}'
Example Response
No Ruby example available, showing cURL
{
  "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"
        ]
      }
    ]
  }
}

Example - A 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.
No Python example available, showing cURL
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"
        ]
      }
    ]
  }
}'
Example Response
No Python example available, showing cURL
{
  "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"
        ]
      }
    ]
  }
}

Example - A 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.
No Javascript example available, showing cURL
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"
        ]
      }
    ]
  }
}'
Example Response
No Javascript example available, showing cURL
{
  "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 /api/as/v1/engines/{ENGINE_NAME}/search_settings/reset
Example - A 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'
Example Response
{
  "search_fields": {
    "description": {
      "weight": 1
    },
    "nps_link": {
      "weight": 1
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tonational-parks-demo 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/national-parks-demo/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
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tonational-parks-demo 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/national-parks-demo/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
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tonational-parks-demo 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/national-parks-demo/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
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tonational-parks-demo 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/national-parks-demo/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
    },
    "states": {
      "weight": 1
    },
    "title": {
      "weight": 1
    },
    "world_heritage_site": {
      "weight": 1
    },
    "id": {
      "weight": 1
    }
  },
  "boosts": {}
}

Example - A POST request tonational-parks-demo 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/national-parks-demo/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
    },
    "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!