Skip to content

Objects

Working with Objects in Tallyfy Answers

Objects are the fundamental data records in Tallyfy Answers. Each object represents a single item that can be indexed, retrieved, and searched within your collections.

What is an object?

An object in Tallyfy Answers:

  • Contains data in JSON format
  • Belongs to a specific collection
  • Has a unique identifier (either custom or auto-generated)
  • Can store multiple properties and values
  • Is fully searchable once indexed

Object identifiers

Tallyfy Answers handles object IDs in two ways:

  1. Custom IDs: If your object includes an id field of type string, Answers will use this as the identifier:

    {
    "id": "product-123",
    "name": "Wireless Headphones",
    "price": 79.99
    }
  2. Auto-generated IDs: If no id field is provided, Answers will automatically generate a unique identifier:

    {
    "name": "Wireless Headphones",
    "price": 79.99
    }

The id field is special and doesn’t need to be explicitly defined in your collection schema.

Object structure flexibility

Unlike traditional databases, Tallyfy Answers doesn’t require you to predefine a rigid schema before adding objects. The system automatically detects properties and data types as you index objects, providing flexibility as your data evolves.

Common object operations

With Tallyfy Answers, you can:

Best practices for objects

  • Use consistent property names across similar objects
  • Choose meaningful custom IDs when possible
  • Structure nested data appropriately for searching
  • Consider batching multiple objects for more efficient indexing
  • Include all relevant data for search in your objects

Browse all object management operations below:

Objects > Index a single object

The endpoint enables individual object indexing into collections through a POST request with JSON data while providing status codes and error handling for real-time updates and low-volume operations.

Answers > Collections

Collections in Tallyfy Answers serve as organizational containers that group similar objects together while enabling operations like searching filtering and managing data through dynamic schemas and efficient organization methods.

Collections > Create a collection

The process of creating collections in Tallyfy Answers involves specifying a unique name through a POST request which automatically detects data types and returns collection details upon successful creation.

Answers > Search

A search operation within Tallyfy Answers performs queries on collections to retrieve relevant objects and information from the system.