@@ -75,12 +75,12 @@ client = meilisearch.Client('http://127.0.0.1:7700', 'masterKey')
75
75
index = client.index(' movies' )
76
76
77
77
documents = [
78
- { " id " : 1 , " title" : " Carol" , " genres" : [" Romance" , " Drama" ] },
79
- { " id " : 2 , " title" : " Wonder Woman" , " genres" : [" Action" , " Adventure" ] },
80
- { " id " : 3 , " title" : " Life of Pi" , " genres" : [" Adventure" , " Drama" ] },
81
- { " id " : 4 , " title" : " Mad Max: Fury Road" , " genres" : [" Adventure" , " Science Fiction" ] },
82
- { " id " : 5 , " title" : " Moana" , " genres" : [" Fantasy" , " Action" ]},
83
- { " id " : 6 , " title" : " Philadelphia" , " genres" : [" Drama" ] },
78
+ { ' id ' : 1 , ' title' : ' Carol' , ' genres' : [' Romance' , ' Drama' ] },
79
+ { ' id ' : 2 , ' title' : ' Wonder Woman' , ' genres' : [' Action' , ' Adventure' ] },
80
+ { ' id ' : 3 , ' title' : ' Life of Pi' , ' genres' : [' Adventure' , ' Drama' ] },
81
+ { ' id ' : 4 , ' title' : ' Mad Max: Fury Road' , ' genres' : [' Adventure' , ' Science Fiction' ] },
82
+ { ' id ' : 5 , ' title' : ' Moana' , ' genres' : [' Fantasy' , ' Action' ]},
83
+ { ' id ' : 6 , ' title' : ' Philadelphia' , ' genres' : [' Drama' ] },
84
84
]
85
85
86
86
# If the index 'movies' does not exist, MeiliSearch creates it when you first add the documents.
@@ -100,17 +100,17 @@ Output:
100
100
101
101
``` json
102
102
{
103
- " hits" : [
103
+ ' hits' : [
104
104
{
105
- "id" : 1 ,
106
- " title" : " Carol" ,
107
- " genre" : [" Romance" , " Drama" ]
105
+ 'id' : 1,
106
+ ' title': ' Carol' ,
107
+ ' genre' : [' Romance', ' Drama' ]
108
108
}
109
109
],
110
- " offset" : 0 ,
111
- " limit" : 20 ,
112
- " processingTimeMs" : 1 ,
113
- " query" : " caorl"
110
+ ' offset' : 0,
111
+ ' limit' : 20,
112
+ ' processingTimeMs' : 1,
113
+ ' query': ' caorl'
114
114
}
115
115
```
116
116
@@ -131,21 +131,21 @@ JSON output:
131
131
132
132
``` json
133
133
{
134
- " hits" : [
134
+ ' hits' : [
135
135
{
136
- "id" : 6 ,
137
- " title" : " Philadelphia" ,
138
- " _formatted" : {
139
- "id" : 6 ,
140
- " title" : " <em>Phil</em>adelphia" ,
141
- " genre" : [" Drama" ]
136
+ 'id' : 6,
137
+ ' title': ' Philadelphia' ,
138
+ ' _formatted' : {
139
+ 'id' : 6,
140
+ ' title': ' <em>Phil</em>adelphia' ,
141
+ ' genre' : [' Drama' ]
142
142
}
143
143
}
144
144
],
145
- " offset" : 0 ,
146
- " limit" : 20 ,
147
- " processingTimeMs" : 0 ,
148
- " query" : " phil"
145
+ ' offset' : 0,
146
+ ' limit' : 20,
147
+ ' processingTimeMs' : 0,
148
+ ' query': ' phil'
149
149
}
150
150
```
151
151
0 commit comments