-
Notifications
You must be signed in to change notification settings - Fork 275
Update db terminologies in blogs #2206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
b47b4e9
bc5f7b0
40d62ed
6b30d7a
a4fae8c
3d608f7
042a33f
91f019a
5be7bd2
a35a05e
0ff9b6f
b86ae65
8ea3713
3e00a20
ed59e2e
e62eb36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,22 +16,22 @@ One such integration you can implement using Appwrite Functions is **Searching** | |||||
|
||||||
# Setting up the Template | ||||||
|
||||||
Meilisearch is a flexible and powerful user-focused search engine that can be added to any website or application. The purpose of this function template is to sync documents in an Appwrite database collection to a Meilisearch index. Using this function template, users can explore, search, and retrieve information from the connected database collection. Through this template, documents from the Appwrite collection are systematically indexed within Meilisearch. | ||||||
Meilisearch is a flexible and powerful user-focused search engine that can be added to any website or application. The purpose of this function template is to sync rows in an Appwrite database table to a Meilisearch index. Using this function template, users can explore, search, and retrieve information from the connected database table. Through this template, rows from the Appwrite table are systematically indexed within Meilisearch. | ||||||
|
||||||
To use the function, you need the following set of keys: | ||||||
|
||||||
- `APPWRITE_KEY` - API Key to talk to Appwrite backend APIs.To generate API Keys you can follow the documentation [here](https://appwrite.io/docs/getting-started-for-server#apiKey) | ||||||
- `APPWRITE_ENDPOINT` - To get the Appwrite endpoint, you need to go to [Appwrite](https://cloud.appwrite.io/) and find it under “Settings” | ||||||
- `APPWRITE_DATABASE_ID` - The ID of the Appwrite database that contains the collection to sync. You can find the documentation [here](https://appwrite.io/docs/databases). | ||||||
- `APPWRITE_COLLECTION_ID` - The ID of the collection in the Appwrite database to sync. | ||||||
- `APPWRITE_DATABASE_ID` - The ID of the Appwrite database that contains the table to sync. You can find the documentation [here](https://appwrite.io/docs/databases). | ||||||
- `APPWRITE_TABLE_ID` - The ID of the table in the Appwrite database to sync. | ||||||
|
||||||
To use Meilisearch, you can either self-host it using the command 👇 | ||||||
|
||||||
```bash | ||||||
curl -L [https://install.meilisearch.com](https://install.meilisearch.com/) | sh | ||||||
``` | ||||||
|
||||||
Or use [Meilisearch Cloud](https://www.meilisearch.com/cloud). For this example, we will assume that you are using Meilisearch Cloud. | ||||||
Or use [Meilisearch Cloud](https://www.meilisearch.com/cloud). For this example, we will assume that you are using Meilisearch Cloud. | ||||||
|
||||||
Here’s the keys you need: | ||||||
|
||||||
|
@@ -40,7 +40,7 @@ Here’s the keys you need: | |||||
|
||||||
 | ||||||
|
||||||
- `MEILISEARCH_ADMIN_API_KEY` - This is the admin API key for Meilisearch. You will find it in the Meilisearch Console under “API Key”. | ||||||
- `MEILISEARCH_ADMIN_API_KEY` - This is the admin API key for Meilisearch. You will find it in the Meilisearch Console under “API Key”. | ||||||
- `MEILISEARCH_SEARCH_API_KEY` - This is the API Key for Meilisearch search operations. To get this, you need you create a new index from the Meilisearch Console. Once created you will find it under `Overview` as `Default Search API Key` | ||||||
|
||||||
|
||||||
|
@@ -50,20 +50,20 @@ Here’s the keys you need: | |||||
|
||||||
 | ||||||
|
||||||
- `MEILISEARCH_INDEX_NAME` - Name of the Meilisearch index to which the documents will be synchronized. For e.g, in the above picture, the Index name is `Newindex`. You can also find it under `Settings` as `Index Name`. | ||||||
- `MEILISEARCH_INDEX_NAME` - Name of the Meilisearch index to which the rows will be synchronized. For e.g, in the above picture, the Index name is `Newindex`. You can also find it under `Settings` as `Index Name`. | ||||||
|
||||||
|
||||||
## Preparing the Function | ||||||
|
||||||
The function template syncs documents in an Appwrite database collection to a Meilisearch index. It should get you up and running, but you will need to add real data to build a useful search index. | ||||||
The function template syncs rows in an Appwrite database table to a Meilisearch index. It should get you up and running, but you will need to add real data to build a useful search index. | ||||||
|
||||||
If you want to see the source code, you can find it on our [templates GitHub repository](https://github.com/appwrite/templates/tree/main/node/sync-with-meilisearch). Now, let’s navigate to our functions page on **[Appwrite](https://cloud.appwrite.io/)**. From there, we will select the **Templates** tab, search for and select the **Sync with Meilisearch** function template. | ||||||
|
||||||
|
||||||
|
||||||
 | ||||||
|
||||||
The function requires `APPWRITE_API_KEY`, `APPWRITE_DATABASE_ID`, `APPWRITE_COLLECTION_ID` , `MEILISEARCH_ENDPOINT`, `MEILISEARCH_ADMIN_API_KEY`, `MEILISEARCH_SEARCH_API_KEY`, `MEILISEARCH_INDEX_NAME`. Once you have added them you can proceed to the Connect step. | ||||||
The function requires `APPWRITE_API_KEY`, `APPWRITE_DATABASE_ID`, `APPWRITE_TABLE_ID` , `MEILISEARCH_ENDPOINT`, `MEILISEARCH_ADMIN_API_KEY`, `MEILISEARCH_SEARCH_API_KEY`, `MEILISEARCH_INDEX_NAME`. Once you have added them you can proceed to the Connect step. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainUnify API key env var name. You use APPWRITE_KEY above and APPWRITE_API_KEY here. Pick one and use consistently (docs/Console show “API Key”). -The function requires `APPWRITE_API_KEY`, `APPWRITE_DATABASE_ID`, `APPWRITE_TABLE_ID` , `MEILISEARCH_ENDPOINT`, ...
+The function requires `APPWRITE_KEY`, `APPWRITE_DATABASE_ID`, `APPWRITE_TABLE_ID`, `MEILISEARCH_ENDPOINT`, ... Or replace earlier mention with APPWRITE_API_KEY—just be consistent across the post and template. 🏁 Script executed: #!/bin/bash
file="src/routes/blog/post/add-a-search-function-to-your-app/+page.markdoc"
echo "Searching for APPWRITE_KEY..."
rg -n "APPWRITE_KEY" "$file" || echo "No occurrences of APPWRITE_KEY found."
echo
echo "Searching for APPWRITE_API_KEY..."
rg -n "APPWRITE_API_KEY" "$file" || echo "No occurrences of APPWRITE_API_KEY found." Length of output: 510 Unify Appwrite API key env var name -The function requires `APPWRITE_API_KEY`, `APPWRITE_DATABASE_ID`, `APPWRITE_TABLE_ID`, …
+The function requires `APPWRITE_KEY`, `APPWRITE_DATABASE_ID`, `APPWRITE_TABLE_ID`, … 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
|
||||||
Select **Create a new repository** (this will generate a GitHub repository for you with the function), and leave the production branch and root settings as default to create this function. | ||||||
|
||||||
|
@@ -84,13 +84,13 @@ Visit the **Domains** tab on the function page and copy the domain URL to test | |||||
We’ve added search functionality to our app and opened up many possibilities to improve the experience of our app’s users. | ||||||
|
||||||
How can the *template* be extended ? | ||||||
- Using events to automatically index new collections | ||||||
- Using events to automatically index new tables | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion "tables" → "rows" (semantic fix). Events will index new/changed rows, not new tables. - Using events to automatically index new tables
+ Using events to automatically index new rows 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
- Using weights and other meilisearch features to optimise search such as excluding certain fields from indexing | ||||||
|
||||||
Some examples are: | ||||||
|
||||||
1. **Real-time Data Exploration:** It can be used to provide real-time search capabilities for datasets and data streams, allowing users to explore and analyze data in real-time. | ||||||
2. **Content Management Systems:** The function template can be integrated into content management systems (CMS) to facilitate efficient content retrieval for editors and site visitors. | ||||||
2. **Content Management Systems:** The function template can be integrated into content management systems (CMS) to facilitate efficient content retrieval for editors and site visitors. | ||||||
|
||||||
Be sure to check out the other available Function Templates. We’ve created multiple that could be of use in your projects. You can find the [templates GitHub repository here](https://github.com/appwrite/templates). | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammar in “Global environment variables” section.
“…allows you to environment variables…” → “…allows you to define environment variables…”.
📝 Committable suggestion
🤖 Prompt for AI Agents