Create search field

Create a new field to search in.

Adds a new field to the search configuration.

Requires authentication.

Request

POST /field

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
fieldstringYesDocument field identifier to add to the search index (e.g. title, description, attributeStr.color.value).
activebooleanNoWhen false, the field is indexed but not used for searching. Defaults to true.
boostFactornumberNoRelevance boost factor (1–10). Higher values prioritize matches in this field. Defaults to 1 (no boost).

Example Request

{
  "field": "manufacturer_title",
  "active": true,
  "boostFactor": 3
}

Response

Returns the created field configuration object.

Body Params
string
boolean

If the active flag is set to false, the field will not be used for searching.

number

The boost to apply to the field. This can be a positive value between 1 and 10. The higher the boost, the more relevant a hit in this field is to the ranking of the search results. If the value is set to 1, no boosting will be applied to the stream.

Headers
string
required

Makaira Instance ID

Response
200

OK

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!