Skip to content

Commit 6a6bdb2

Browse files
Prefer MEILISEARCH_URL over localhost:7700 (#3083)
* replace http://localhost:7700 in code samples
1 parent 20a74fd commit 6a6bdb2

19 files changed

+240
-252
lines changed

.code-samples.meilisearch.yaml

Lines changed: 208 additions & 208 deletions
Large diffs are not rendered by default.

guides/computing_hugging_face_embeddings_gpu.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Next, enable the vector store experimental feature:
5959

6060
```sh
6161
curl \
62-
-X PATCH 'http://localhost:7700/experimental-features/' \
62+
-X PATCH 'MEILISEARCH_URL/experimental-features/' \
6363
-H 'Content-Type: application/json' \
6464
--data-binary '{ "vectorStore": true }'
6565
```
@@ -68,7 +68,7 @@ Then add the Hugging Face embedder to your index settings:
6868

6969
```sh
7070
curl \
71-
-X PATCH 'http://localhost:7700/indexes/INDEX_NAME/settings/embedders' \
71+
-X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/embedders' \
7272
-H 'Content-Type: application/json' \
7373
--data-binary '{ "default": { "source": "huggingFace" } }'
7474
```

guides/front_end/search_bar_for_docs.mdx

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,15 @@ This tutorial will guide you through the steps of building a relevant and powerf
1313

1414
## Run a Meilisearch instance
1515

16-
First of all, you need your documentation content to be scraped and pushed into a Meilisearch instance.
17-
18-
You can install and run Meilisearch on your machine using `curl`.
19-
20-
```bash
21-
curl -L https://install.meilisearch.com | sh
22-
./meilisearch --master-key=MASTER_KEY
23-
```
24-
25-
We provide a few [other installation methods](/learn/self_hosted/getting_started_with_self_hosted_meilisearch#setup-and-installation).
26-
27-
Meilisearch is open-source and can run either on your server or on any cloud provider.
16+
First, create a new Meilisearch project on Meilisearch Cloud. You can also [install and run Meilisearch locally or in another cloud service](/learn/self_hosted/getting_started_with_self_hosted_meilisearch#setup-and-installation).
2817

2918
<Capsule intent="note">
30-
3119
The host URL and the API key you will provide in the next steps correspond to the credentials of this Meilisearch instance.
32-
In the example above, the host URL is `http://localhost:7700` and the API key is `MASTER_KEY`.
33-
3420
</Capsule>
3521

3622
## Scrape your content
3723

38-
The Meili team provides and maintains a [scraper tool](https://github.com/meilisearch/docs-scraper) to automatically read the content of your website and store it into an index in Meilisearch.
24+
The Meilisearch team provides and maintains a [scraper tool](https://github.com/meilisearch/docs-scraper) to automatically read the content of your website and store it into an index in Meilisearch.
3925

4026
### Configuration file
4127

@@ -98,7 +84,7 @@ You can run the scraper with Docker. With our local Meilisearch instance set up
9884
```bash
9985
docker run -t --rm \
10086
--network=host \
101-
-e MEILISEARCH_HOST_URL='http://localhost:7700' \
87+
-e MEILISEARCH_HOST_URL='MEILISEARCH_URL' \
10288
-e MEILISEARCH_API_KEY='MASTER_KEY' \
10389
-v <absolute-path-to-your-config-file>:/docs-scraper/config.json \
10490
getmeili/docs-scraper:latest pipenv run ./docs_scraper config.json
@@ -166,7 +152,8 @@ module.exports = {
166152
}
167153
```
168154

169-
The `hostUrl` and the `apiKey` fields are the credentials of the Meilisearch instance. Following on from this tutorial, they are respectively `http://localhost:7700` and `MASTER_KEY`.
155+
The `hostUrl` and the `apiKey` fields are the credentials of the Meilisearch instance. Following on from this tutorial, they are respectively `MEILISEARCH_URL` and `MASTER_KEY`.
156+
170157
`indexUid` is the index identifier in your Meilisearch instance in which your website content is stored. It has been defined in the [config file](#configuration-file).
171158

172159
These three fields are mandatory, but more [optional fields are available](https://github.com/meilisearch/vuepress-plugin-meilisearch#customization) to customize your search bar.
@@ -208,7 +195,8 @@ _[Docxtemplater](https://docxtemplater.com/) search bar demo_
208195
</html>
209196
```
210197

211-
The `hostUrl` and the `apiKey` fields are the credentials of the Meilisearch instance. Following on from this tutorial, they are respectively `http://localhost:7700` and `MASTER_KEY`.
198+
The `hostUrl` and the `apiKey` fields are the credentials of the Meilisearch instance. Following on from this tutorial, they are respectively `MEILISEARCH_URL` and `MASTER_KEY`.
199+
212200
`indexUid` is the index identifier in your Meilisearch instance in which your website content is stored. It has been defined in the [config file](#configuration-file).
213201
`inputSelector` is the `id` attribute of the HTML search input tag.
214202

guides/improve_relevancy_large_documents.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ To prevent that from happening, configure `story_id` as the index's distinct att
123123

124124
```sh
125125
curl \
126-
-X PUT 'http://localhost:7700/indexes/INDEX_NAME/settings/distinct-attribute' \
126+
-X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/distinct-attribute' \
127127
-H 'Content-Type: application/json' \
128128
--data-binary '"story_id"'
129129
```

learn/ai_powered_search/deactivate_ai_powered_search.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Alternatively, use [the `/experimental` route](/reference/api/experimental_featu
2525

2626
```sh
2727
curl \
28-
-X PATCH 'http://localhost:7700/experimental-features/' \
28+
-X PATCH 'MEILISEARCH_URL/experimental-features/' \
2929
-H 'Content-Type: application/json' \
3030
--data-binary '{
3131
"vectorStore": false

learn/ai_powered_search/search_with_user_provided_embeddings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Configure the `embedder` index setting, settings its source to `userProvided`:
1717

1818
```sh
1919
curl \
20-
-X PATCH 'http://localhost:7700/indexes/movies/settings' \
20+
-X PATCH 'MEILISEARCH_URL/indexes/movies/settings' \
2121
-H 'Content-Type: application/json' \
2222
--data-binary '{
2323
"embedders": {

learn/async/task_webhook.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ A common asynchronous operation is adding or updating documents to an index. The
3838

3939
```sh
4040
curl \
41-
-X POST 'http://localhost:7700/indexes/books/documents' \
41+
-X POST 'MEILISEARCH_URL/indexes/books/documents' \
4242
-H 'Content-Type: application/json' \
4343
--data-binary '[
4444
{

learn/engine/datatypes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The following query returns patients `0` and `1`:
257257

258258
```sh
259259
curl \
260-
-X POST 'http://localhost:7700/indexes/clinic_patients/search' \
260+
-X POST 'MEILISEARCH_URL/indexes/clinic_patients/search' \
261261
-H 'Content-Type: application/json' \
262262
--data-binary '{
263263
"q": "",

learn/filtering_and_sorting/filter_expression_reference.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ This is an experimental feature. Use the experimental features endpoint to activ
179179

180180
```sh
181181
curl \
182-
-X PATCH 'http://localhost:7700/experimental-features/' \
182+
-X PATCH 'MEILISEARCH_URL/experimental-features/' \
183183
-H 'Content-Type: application/json' \
184184
--data-binary '{
185185
"containsFilter": true
@@ -211,7 +211,7 @@ This is an experimental feature. Use the experimental features endpoint to activ
211211

212212
```sh
213213
curl \
214-
-X PATCH 'http://localhost:7700/experimental-features/' \
214+
-X PATCH 'MEILISEARCH_URL/experimental-features/' \
215215
-H 'Content-Type: application/json' \
216216
--data-binary '{
217217
"containsFilter": true

learn/multi_search/performing_federated_search.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Download the following datasets: <a href="/assets/datasets/crm-chats.json">`crm-
2121
Add the datasets to Meilisearch and create three separate indexes, `profiles`, `chats`, and `tickets`:
2222

2323
```sh
24-
curl -X POST 'http://localhost:7700/indexes/profiles' -H 'Content-Type: application/json' --data-binary @crm-profiles.json &&
25-
curl -X POST 'http://localhost:7700/indexes/chats' -H 'Content-Type: application/json' --data-binary @crm-chats.json &&
26-
curl -X POST 'http://localhost:7700/indexes/tickets' -H 'Content-Type: application/json' --data-binary @crm-tickets.json
24+
curl -X POST 'MEILISEARCH_URL/indexes/profiles' -H 'Content-Type: application/json' --data-binary @crm-profiles.json &&
25+
curl -X POST 'MEILISEARCH_URL/indexes/chats' -H 'Content-Type: application/json' --data-binary @crm-chats.json &&
26+
curl -X POST 'MEILISEARCH_URL/indexes/tickets' -H 'Content-Type: application/json' --data-binary @crm-tickets.json
2727
```
2828

2929
[Use the tasks endpoint](/learn/async/working_with_tasks) to check the indexing status. Once Meilisearch successfully indexed all three datasets, you are ready to perform a federated search.
@@ -36,7 +36,7 @@ Use the `/multi-search` endpoint with the `federation` parameter to query the th
3636

3737
```sh
3838
curl \
39-
-X POST 'http://localhost:7700/multi-search' \
39+
-X POST 'MEILISEARCH_URL/multi-search' \
4040
-H 'Content-Type: application/json' \
4141
--data-binary '{
4242
"federation": {},
@@ -90,7 +90,7 @@ Use the `weight` property of the `federation` parameter to boost results coming
9090

9191
```sh
9292
curl \
93-
-X POST 'http://localhost:7700/multi-search' \
93+
-X POST 'MEILISEARCH_URL/multi-search' \
9494
-H 'Content-Type: application/json' \
9595
--data-binary '{
9696
"federation": {},

0 commit comments

Comments
 (0)