Objects
What are objects in Tallyfy Answers?
Section titled “What are objects in Tallyfy Answers?”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.
How do objects work in Tallyfy Answers?
Section titled “How do objects work in Tallyfy Answers?”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.
How do object identifiers work?
Section titled “How do object identifiers work?”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.
How flexible is object structure?
Section titled “How flexible is object structure?”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.
Which fields does search need?
Section titled “Which fields does search need?”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 identifiertitle: the title shown in resultsurl: the link a result openscontent: the main texthierarchy: an object such as{"lvl0": "Documentation", "lvl1": "Getting started"}source: a name such asDocs, which search can filter onsnippet: 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
What are the best practices for objects?
Section titled “What are the best practices for objects?”- Use the same property names across similar objects. Tallyfy Answers detects properties as you index, so
pricein one object andcostin 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:
Related articles
Section titled “Related articles”Objects > Index multiple objects
Collections > Create a collection