Objects
Each entry in the Object Store is called an Object. Objects contain data in the form of fields that can be text, URLs to resources (images/audio/video) or other data types (price, date, numbers, etc.). Objects are schemaless, meaning you can store any valid JSON in the Objective platform. Objects pushed to the catalog are not modified at any point during processing by our system and will be returned in downstream APIs unmodified.
What should I include in an Object?
In general we suggest adding any data that could be relevant at any point in the future for search.
For example, the following data types could be relevant:
- Free form text fields - i.e. title, description, etc.
- URLs to content - i.e. images, HTML pages or videos (see media fields)
- Fields you want to filter by - i.e. "category", "type", identifiers, etc.. (see filtering objects)
- Data related to business KPIs or user interactions - i.e. views, likes, number of sales, etc.. These can be used as Ranking Signals
Media fields
Objective's API supports crawling and indexing media alongside text to enable multimodal search. There is currently 1 type of media currently supported:
- Images
To include a media item in an Object simply add the URL in a field in the Object. Our system utilizes a crawler that can crawl URLs found in Objects and utilize them for downstream tasks (such as search).
For example, to add an image for image search, define the Object as follows:
{
"id": 1,
"title": "photo of a dog",
"image_url": "https://example.com/dog.png" // This field can be crawled
}
Supported media types
For a list of supported media types see: Crawling
Filtering Objects
Filtering Objects and search results is a commonly performed task. In order to filter Objects we must include the fields & values we want to filter by in the Objects we add to the Catalog. Simply add fields to the data you want to filter by and they will become available for use in Catalog APIs such as search.
For example, if you want to filter by "category" where category could contain "produce", "meats" or "dairy", include the field "category" in the Objects you add to the catalog:
{
"id": 1,
"name": "cheese",
"category": "dairy"
}
{
"id": 2,
"name": "milk",
"category": "dairy"
}
{
"id": 3,
"name": "tomato",
"category": "produce"
}
{
"id": 4,
"name": "chicken",
"category": "meats"
}
Now in downstream APIs such as search you can use the "category" field to filter results (see: Filtering search results)