Use metadata

Attach extra fields to your documents. Metadata is returned with every search result — perfect for URLs, tags, prices, or anything your UI needs.


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

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

await etoile.index({
id: "starry-night",
collection: "paintings",
title: "The Starry Night",
content: "A swirling night sky over a village...",
metadata: {
  artist: "Vincent van Gogh",
  year: 1889,
  url: "/paintings/starry-night",
},
});

Related