Indexing
Last updated
Last updated
Indexing is how you add your products to the search engine. For better understanding by the Neuralens Engine and better relevance, refer the set of standardized fields. If you product attributes are not in the standardized set, you can use custom field names.
POST
https://api.neuralens.ai/search/index
Indexes a new product. You can index up to 100 products in a single request.
Indexing is asynchronous. It may take up to an hour for newly indexed products to reflect in Search.
Header | Value |
---|---|
Param | Value |
---|---|
Let's say partition
is enabled on field "continent", then when sending request for the continent "asia", partition will be asia
These fields allow Neuralens to understand what the product is, and greatly affect the search performance.
Standardized fields are product fields that have a special meaning in the Neuralens system. Use the standardized fields instead of custom fields wherever a standardized field exists. That means, instead of adding the product name to a field called "name", use the standardized "title" field. For a field like Brand, or Fabric, use custom fields.
The following fields are standardized:
Any attribute which is not a part of the standardized fields set is a custom field.
The following types are supported in custom fields:
String
Integer
Float
Boolean
Datetime
List (lists of Strings, Integers, Floats are supported. A list should have values of only one type)
Field Name | Type | Description |
---|---|---|
X-Neuralens-API-Key
Bearer YOUR_API_KEY_HERE
X-Neuralens-Application-ID
YOUR_APPLICATION_ID
partition
Partition field's value (required in case partitioning is done)
id
string
The product's unique identifier. A call to /search/index for an id which already exists will overwrite the existing data
title
string
The product's name
productUrl
string
The URL to the product details page of the product. The url that is opened on clicking the product.
categories
list of string
The category hierarchy of the product in the catalog. The categories should be ordered with the top level hierarchy coming first in the list.
NOTE:
last value of categories will be treated as product type
eg: ["Women", "Topwear", "Tshirts"],
images
list of string
eg: ["https://cdn.example.com/123", "https://cdn.example.com/789"]
listPrice
float
The original price of the product
salePrice
float
The discounted price