Skip to main content
POST
/
api
/
v2
/
search_engines
/
{hashid}
/
indices
/
{name}
/
temp
/
items
/
_bulk
Create in bulk in temporal
curl --request POST \
  --url https://{search_zone}-api.doofinder.com/api/v2/search_engines/{hashid}/indices/{name}/temp/items/_bulk \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "title": "Adidas Originals Trefoil Hoodie",
    "link": "https://woocommerce.doofinder.com/product/adidas-originals-trefoil-hoodie/",
    "image_link": "https://woocommerce.doofinder.com/wp-content/uploads/2024/02/suda-6-scaled.jpg",
    "id": "1234",
    "color": "blue",
    "price": 15.99,
    "sale_price": 11.99,
    "categories": [
      "Clothes > Hoodie",
      "Men > Hoodie"
    ]
  }
]
'
{
  "results": [
    {
      "result": "updated",
      "id": "1234"
    }
  ],
  "errors": false
}

Authorizations

Authorization
string
header
required

Doofinder API key. Pass it as: Authorization: Token <api_key>

Path Parameters

hashid
string
required

Unique id of a search engine.

Pattern: ^[a-f0-9]{32}$
name
string
required

Name of an index.

Pattern: ^[a-z][a-z0-9_]*$

Body

application/json
Required array length: 1 - 100 elements
id
string

Item id

group_id
string | null

This field indicates the group to which this item belongs to. All items with the same group_id will be collapsed into one in search results, returning the most relevant one or the group leader if they all have the same score.

group_leader
boolean | null

This field indicates the item chosen as the default among its group. It will be returned in search results if there is no other item with a higher score.

df_group_leader
boolean | null
deprecated

(Deprecated) This field indicates the item chosen as the default among its group. It will be returned in search results if there is no other item with a higher score.

df_manual_boost
number<double> | null

A numeric score boosting. It multiplies the natural score of the item for a search. For instance, if boost is greater than 1.0 the item will appear higher in the results. If it is lower than 1.0, it will appear lower. The minimum value is 0.0.

Required range: x >= 0
categories

This field has special behaviour when Indice has product preset, categories shall be specified as:

{
...
categories: [
'parent category > inner category > leaft category',
'other parent > other inner > other leaft'
]
}

This way, when using categories field in facets, it will work as expected. When Index has generic preset, this works as normal field but it should be string.

best_price
number | null

Auto created field that gets the min value between price or sale_price fields, if added in the document. It gets null if doesn't find any of these fields.

It is not necessary to send this field to index it.
title
string | null

Response

Bulk operation successful.

Result for bulk operations.

results
object[]

List of results of each bulk operation.

errors
boolean

Indicates if there is any error in the results.