Sync Custom Fields
Before start, thanks for using our products :). So this is the first step to integrate with our system. Before you send us your data, you must tell us some additional fields that we have't provide. When you create an engine, you can see the field that we provide in the client panel (Performance Settings -> Custom Rankings -> Mapping Field). Those fields are the default fields that we generate base on your engine's profile (ecommerce, custom, or blog) when you create the engine. There are 4 atrributes that you have to give when adding fields using this endpoint.
The first one is 'name', which tell us the name of the fields. The second one is 'type', which described the data type of the fields.You can choose one of many datatype that are provided by elasticsearch. The common data types that we used are object, text, keyword, long, integer, short, byte, double, float, half_float, scaled_float, date, boolean, binary, integer_range, float_range, long_range, double_range, date_range, geo_point. The third one is 'synonyms' this is also important. We have a feature called synonyms, so this attribute will help us to identify either your new field will be applied with this logic or not. You have to fill this attribute with 'true' or 'false'. Last but not least, an attribute that called 'index'. This one will help us to identify either the field can be used to do search or not. So here is the example and all params that you have to provide.
We also use title, image_link, thumb_link for rendering the data in boosting and custom results page. So please fill these 3 fields with the correct value. For example if you have productName, please duplicate the value and insert it to title field, so we can render the boosting page properly for you. Same thing goes with image_link and thumb_link
For nested fields. Example: {"brand": {"name": "brand_name" }} Just use the type: "object"
note
Don't include the default field to the request body, the concept is sync not add or remove. It means that if you hit this endpoint by having 'thumb_link' and 'description' at first, then you hit this api again with just 'thumb_link' as request body, THE 'DESCRIPTION' WILL BE DELETED.
POST#
#
Example Usage#
HeaderField | Type | Description |
---|---|---|
x-token | String | token Users unique token |
#
Request BodyField | Type | Description |
---|---|---|
customFields | Object[] | Custom Fields objects |
name | String | Name of custom fields |
type | String | Type of custom fields |
ignoreNonAlphanum | Boolean | Ignore Non Alphanum characters or not , must be filled with true or false - default: false |
applySynonyms | Boolean | Apply synonyms or not (only set true to type: text), must be filled with true or false - default: false |
index | Boolean | Index the fields or not (to be searchable or not), must be filled with true or false - default: false |
filter | Boolean | The value must between "term" or "range". Apply filter in the specific fields, to apply filter the index must true |
#
Success ResponseField | Type | Description |
---|---|---|
success | Boolean | Request was successful |