Skip to content

Commit b773cfa

Browse files
committed
doc: update README
Signed-off-by: Xin Liu <sam@secondstate.io>
1 parent 4e59d0f commit b773cfa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ To create an index for a list of documents, you can use the `/v1/index/create` e
7777
```bash
7878
# Create index from a list of files
7979
curl --location 'http://localhost:12306/v1/index/create' \
80+
--form 'index_name="paris"' \
8081
--form 'file1=@"paris.txt"' \
8182
--form 'file2=@"paris.md"'
8283
```
@@ -97,8 +98,8 @@ To create an index for a list of documents, you can use the `/v1/index/create` e
9798
"error": null
9899
}
99100
],
100-
"index_name": "index-4aae1cf6-d8dc-4233-b2bb-43911f9b74fd",
101-
"download_url": "http://localhost:9069/v1/index/download/index-4aae1cf6-d8dc-4233-b2bb-43911f9b74fd"
101+
"index_name": "paris",
102+
"download_url": "http://localhost:9069/v1/index/download/paris"
102103
}
103104
```
104105

@@ -111,6 +112,7 @@ To create an index for a list of documents, you can use the `/v1/index/create` e
111112
curl --location 'http://localhost:12306/v1/index/create' \
112113
--header 'Content-Type: application/json' \
113114
--data '{
115+
"index": "paris",
114116
"documents": [
115117
{
116118
"content": "Paris, city and capital of France, ..."
@@ -158,8 +160,8 @@ To create an index for a list of documents, you can use the `/v1/index/create` e
158160
"error": null
159161
}
160162
],
161-
"index_name": "index-a1f79ad1-b47b-4e36-948e-a591646ca014",
162-
"download_url": "http://localhost:9069/v1/index/download/index-a1f79ad1-b47b-4e36-948e-a591646ca014"
163+
"index_name": "paris",
164+
"download_url": "http://localhost:9069/v1/index/download/paris"
163165
}
164166
```
165167

@@ -173,7 +175,7 @@ curl --location 'http://localhost:12306/v1/search' \
173175
--data '{
174176
"query": "What is the location of Paris, France along the Seine river?",
175177
"top_k": 5,
176-
"index": "index-a1f79ad1-b47b-4e36-948e-a591646ca014"
178+
"index": "paris"
177179
}'
178180
```
179181

0 commit comments

Comments
 (0)