Skip to content

v0.5.0

Compare
Choose a tag to compare
@anttiai anttiai released this 19 Aug 06:26
· 139 commits to master since this release

Added functions to use Indexing API to create, update, fetch, and delete single documents or batches of documents. The full indexing API documentation can be found at addsearch.com

Example of indexing a document:

// Define a document (schemaless)
const doc = {
  custom_fields: {
    'name': 'Example product',
    'description': 'Description for the example product',
    'price_cents': 599,
    'average_customer_rating': 4.5
  }
};

// Save the document
client.saveDocument(doc)
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.log(error);
  });