Skip to content
Developers

Objects

Objects are the items you want Tallyfy Answers to find, such as products or documentation pages. You index objects in batches, search them, and delete them by their uid.

An object is a JSON record that belongs to one collection. Give each object a unique uid. Once it’s indexed, search can find it.

Tallyfy Answers identifies each object by a uid field that you set:

{
"uid": "product-123",
"name": "Wireless Headphones",
"price": 79.99
}

Always send a uid. An object without one is still stored, but you can’t update it by importing it again, delete it on its own, or use it as the reference for similar-object recommendations. It also appears in search results with "id": null.

Don’t put the identifier in a field named id. The service only reads uid, and Weaviate’s documentation lists id as a reserved property name, so an object carrying one may fail to index.

You don’t need to define the uid field yourself. Creating a collection adds it as a text property.

You don’t have to define a schema before adding objects. Tallyfy Answers detects properties and data types automatically as you index objects, so adding a new property later needs no schema change.

Search, recommendations and featured objects read seven fields from every object. Include all of them, or search on that collection can come back empty or fail:

  • uid: the object’s unique identifier
  • title: the title shown in results
  • url: the link a result opens
  • content: the main text
  • hierarchy: an object such as {"lvl0": "Documentation", "lvl1": "Getting started"}
  • source: a name such as Docs, which search can filter on
  • snippet: a short summary

What operations can you perform on objects?

Section titled “What operations can you perform on objects?”
  • Index objects with batch import
  • List every object in a collection with GET /collections/{collection_name}/objects. It needs the API key and returns {"message": [...], "status": 200}, with every object’s properties in one response and no paging. For a collection that doesn’t exist it still answers HTTP 200, with {"error": "Collection not found", "status": 404} in the body.
  • Delete objects
  • Search for objects within collections
  • Use the same property names across similar objects. Tallyfy Answers detects properties as you index, so price in one object and cost in another become two separate properties.
  • Use the ID your own system already has, such as a product code, as the uid. You can then update or delete the object later by that ID.
  • Index objects with batch import, which is the only way to add them.
  • Put descriptive text in each object. Search and similar-object recommendations compare the text inside your objects, so a record with only a name and a price gives them little to match.

Browse all Tallyfy Answers object management operations below:

Answers > Collections

Collections in Tallyfy Answers group similar objects together, like database tables. You can…