Skip to content

Commit 499c966

Browse files
authored
Remove Examples sections (#150)
1 parent 07fe2a2 commit 499c966

File tree

1 file changed

+11
-123
lines changed

1 file changed

+11
-123
lines changed

README.md

Lines changed: 11 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929
- [🔧 Installation](#-installation)
3030
- [🚀 Getting started](#-getting-started)
3131
- [🤖 Compatibility with MeiliSearch](#-compatibility-with-meilisearch)
32-
- [🎬 Examples](#-examples)
33-
- [Indexes](#indexes)
34-
- [Documents](#documents)
35-
- [Update status](#update-status)
36-
- [Search](#search)
32+
- [🎬 Documentation and Examples](#-documentation-and-examples)
3733
- [⚙️ Development Workflow and Contributing](#️-development-workflow-and-contributing)
3834

3935
## 🔧 Installation
@@ -79,9 +75,10 @@ documents = [
7975
index.add_documents(documents) # => { "updateId": 0 }
8076
```
8177

82-
With the `updateId`, you can check the status (`processed` or `failed`) of your documents addition thanks to this [method](#update-status).
78+
With the `updateId`, you can check the status (`processed` or `failed`) of your documents addition thanks to this [method](https://docs.meilisearch.com/references/updates.html#get-an-update-status).
8379

8480
#### Search in index <!-- omit in toc -->
81+
8582
``` python
8683
# MeiliSearch is typo-tolerant:
8784
index.search('harry pottre')
@@ -107,128 +104,19 @@ This package is compatible with the following MeiliSearch versions:
107104
- `v0.14.X`
108105
- `v0.13.X`
109106

110-
## 🎬 Examples
111-
112-
You can check out [the API documentation](https://docs.meilisearch.com/references/).
113-
114-
### Indexes
115-
116-
#### Create an index <!-- omit in toc -->
117-
```python
118-
# Create an index
119-
client.create_index('books')
120-
# Create an index and give the primary-key
121-
client.create_index('books', {'primaryKey': 'book_id'})
122-
# Get an index or create it if it doesn't exist
123-
client.get_or_create_index('books', {'primaryKey': 'book_id'})
124-
```
125-
126-
#### List all indexes <!-- omit in toc -->
127-
```python
128-
client.get_indexes()
129-
```
130-
131-
#### Get an index object <!-- omit in toc -->
132-
133-
```python
134-
index = client.get_index('books')
135-
```
136-
137-
### Documents
138-
139-
#### Fetch documents <!-- omit in toc -->
140-
141-
```python
142-
# Get one document
143-
index.get_document(123)
144-
# Get documents by batch
145-
index.get_documents({ 'offset': 10 , 'limit': 20 })
146-
```
147-
148-
#### Add documents <!-- omit in toc -->
149-
150-
```python
151-
index.add_documents([{ 'book_id': 2, 'title': 'Madame Bovary' }])
152-
```
153-
154-
Response:
155-
```json
156-
{
157-
"updateId": 1
158-
}
159-
```
160-
This `updateId` allows you to [track the current update](#update-status).
161-
162-
#### Delete documents <!-- omit in toc -->
163-
164-
```python
165-
# Delete one document
166-
index.delete_document(2)
167-
# Delete several documents
168-
index.delete_documents([1, 42])
169-
# Delete all documents
170-
index.delete_all_documents()
171-
```
172-
173-
### Update status
174-
175-
```python
176-
# Get one update status
177-
# Parameter: the updateId got after an asynchronous request (e.g. documents addition)
178-
index.get_update_status(1)
179-
# Get all updates status
180-
index.get_all_update_status()
181-
```
182-
183-
### Search
107+
## 🎬 Documentation and Examples
184108

185-
#### Basic search <!-- omit in toc -->
109+
MeiliSearch documentation provides **examples** and a detailed explanation of every one of its features and functionalities, including examples on how to implement them **using this SDK**.
186110

187-
```python
188-
index.search('prince')
189-
```
190-
191-
```json
192-
{
193-
"hits": [
194-
{
195-
"book_id": 456,
196-
"title": "Le Petit Prince"
197-
},
198-
{
199-
"book_id": 4,
200-
"title": "Harry Potter and the Half-Blood Prince"
201-
}
202-
],
203-
"offset": 0,
204-
"limit": 20,
205-
"processingTimeMs": 13,
206-
"query": "prince"
207-
}
208-
```
111+
Please read the [guides available in the documentation](https://docs.meilisearch.com/guides/) or check the [API references](https://docs.meilisearch.com/references/) to find the one that you need!
209112

210-
#### Custom search <!-- omit in toc -->
113+
The following sections may interest you:
211114

212-
All the supported options are described in [this documentation section](https://docs.meilisearch.com/references/search.html#search-in-an-index).
115+
- [Manipulate documents](https://docs.meilisearch.com/references/documents.html)
116+
- [Search](https://docs.meilisearch.com/references/search.html)
117+
- [Manage the indexes](https://docs.meilisearch.com/references/indexes.html)
118+
- [Configure the index settings](https://docs.meilisearch.com/references/settings.html)
213119

214-
```python
215-
response = index.search('prince', { 'limit': 1 })
216-
```
217-
218-
```json
219-
{
220-
"hits": [
221-
{
222-
"book_id": 456,
223-
"title": "Le Petit Prince"
224-
}
225-
],
226-
"offset": 0,
227-
"limit": 1,
228-
"processingTimeMs": 10,
229-
"query": "prince"
230-
}
231-
```
232120
## ⚙️ Development Workflow and Contributing
233121

234122
Any new contribution is more than welcome in this project!

0 commit comments

Comments
 (0)