---
# System prepended metadata

title: Untitled

---

```jsx=
const makeFetch = async () => {
		const client = algoliasearch("AWP6XJTOHO", "5c9f99984de00baad844fb1c8570aebc");
		const index = client.initIndex("6024fb5291bd9f0008b578ba-sandbox-copilot-search-item");

		// const client = algoliasearch("FXU07E57SD", "8c80b97782e24676655c1e6043b9ac8d");
		// const index = client.initIndex("testingahd");
		// await index.setSettings({ attributesForFaceting: ["attributes.key.ccc", "filterOnly(attributes.key.value)"] });
		// index
		// .search("Fo")
		// .then(({ hits }) => {
		//   console.log(hits);
		// })
		// .catch(err => {
		//   console.log(err);
		// });

		// filter:"ccc:true"
		try {
			const data = await index.search("", {
				page: 0,
				hitsPerPage: 9,
				facetFilters: [
					["attributes.key:related-website", "attributes.key:subscription"],
					["attributes.value:ccc", "attributes.value:test"],
				],
			});
			console.log("data", data);
		} catch (error) {
			console.log("error", error);
		}
	};
    ```
    