Skip to content

Commit

Permalink
added simple documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredgrip committed Nov 29, 2024
1 parent b50ba07 commit 2cc0b99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/reference/external-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ Shlink is used to create short links. We provide an interface for members to cre
### MinIO

MinIO is used to store files like profile pictures and meeting documents.

### Meilisearch

Meilisearch is used to provide a good search experience. It can index data from our database and provide rich search capabilities.
8 changes: 8 additions & 0 deletions src/routes/(app)/api/search/+server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import type { RequestHandler } from "@sveltejs/kit";
import { meilisearch } from "./meilisearch";

/**
* This endpoint is used to search multiple indexes at once.
* It takes a query and a list of indexes to search in.
* It will return the results from each index.
* Example usage:
* GET /api/search?query=oddput clementin&indexes=["members", "articles"]
* This will search for "oddput clementin" in the "members" and "articles" indexes.
*/
export const GET: RequestHandler = async ({ url }) => {
const query = url.searchParams.get("query");
if (!query) {
Expand Down

0 comments on commit 2cc0b99

Please sign in to comment.