Skip to main content
C SDK / Examples Three complete programs you can build and run against your own project. Each expects credentials as command-line arguments:
See Getting started for compile and link commands. All three share this small helper that checks a MossResult and prints the last error on failure:

Session workflow

Open a session, add documents with metadata, query (with and without a filter), fetch documents, and push the index to the cloud. Queries run locally on the session.

Cloud CRUD

A full client-side workflow against a cloud index: create with documents, read metadata, list, add more, fetch, load for querying, query, delete documents, and delete the index. Note that querying requires loading the index into memory first.

Metadata filtering

Create a cloud index, load it locally, then run $eq, $and, $in, and $near filters. Filtering requires a loaded index, so the program loads before querying.
For the filter format and the full operator list, see Metadata filters in the API reference.