Skip to content

Prepare your data

A document in Typemo is one flat record: field names and values, nothing nested. How you shape those records decides what search can find, show and filter. This page explains the shape before your first import.

One record is one thing a visitor can find: a product, an article, a page.

{
"id": "tee-001",
"title": "Cotton T-shirt",
"price": 29.0,
"category": "Apparel",
"in_stock": true
}

A CSV row, a feed item and a JSON object over the API all end up in this shape. So the rules on this page hold for every import method.

An export usually carries more than search needs: internal flags, warehouse codes, audit dates. Keep a field when it passes one of three tests:

  • Visitors search it: titles, descriptions, brands.
  • You show it: prices, images, links, stock.
  • You filter or boost by it: ratings, colours, sale flags.

Every other field makes records bigger and the column lists on Search → Setup longer. Records also have a size limit, listed in Formats and limits.

Three habits pay off:

  • One record per thing people find. To find articles by author, send article records that carry the author’s name. Repeating a value across many records is fine: flat beats nested here.
  • Compute signals at export. A bestseller flag or a sales count gives a boosting rule something to act on.
  • Send text, not HTML. Markup in a title, content or category column is indexed as sent, and visitors see the tags. The import report warns you when it finds some.

The id is how an update finds the document it replaces. It comes from the first of these that your data has:

  1. The column with the Unique ID role, if you picked one on Search → Setup. Every row must fill it: a row with it empty is rejected.
  2. A field named id.
  3. The row’s content. A file or feed with no id gets one made from each row’s values. The same file imported again updates its documents instead of duplicating them.

An API push always needs its own id, a string or a number. It is the only field the API requires.

Give rows an id when you can. Without one, a row whose values change becomes a new document.

A whole-number id is kept as it is. Any other id, such as tee-001 or 0042, gets a numeric id in search results, and your own comes back beside it as _source_id. Updates and deletes by your id keep working.

Ids are compared as text: 0123 and 123 are two documents, and so are SKU-1 and sku-1. What happens to an id that repeats within one import is on Formats and limits.

You don’t need a column called title. Title is a role, and any column can hold it: name, headline, product_name, whatever your system exports. The same goes for the price, the image and every other role.

A role points at a column and leaves its name alone. If your CMS calls the title headline, the widget reads headline as the title. Move to a CMS that calls it name, and you change one choice on Search → Setup instead of reshaping your export.

When we index your data, each column name gets a stored form without spaces or punctuation. The dashboard keeps showing the names from your export, and nothing in your source is renamed.

A role also decides the kind of value its column must hold: a price must be a number. Those checks run on every import, and Roles lists the accepted formats.

Next: Map your fields once your data is imported, or choose how to import first.