Update document

Update document fields without re-indexing content. Useful for changing title and metadata like URLs, prices, or feature flags.


import { Etoile } from "@etoile-dev/client";

const etoile = new Etoile({
apiKey: process.env.ETOILE_API_KEY,
});

await etoile.patch({
id: "starry-night",
title: "The Starry Night (Featured)",
metadata: {
  artist: "Vincent van Gogh",
  year: 1889,
  featured: true,
},
});

Related