3
3
# the documentation on build
4
4
# You can read more on https://github.com/meilisearch/documentation/tree/master/.vuepress/code-samples
5
5
---
6
- multi_search_1 : |-
7
- see cURL: https://github.com/meilisearch/documentation/blob/5ec3df3844f603f0958d91a0c5cfc38bc57656af/.code-samples.meilisearch.yaml#L996-L1017
8
- multi-search with data: { "queries": [
9
- {
10
- "indexUid": "movies",
11
- "q": "pooh",
12
- "limit": 5
13
- },
14
- {
15
- "indexUid": "movies",
16
- "q": "nemo",
17
- "limit": 5
18
- },
19
- {
20
- "indexUid": "movie_ratings",
21
- "q": "us"
22
- }
23
- ]
24
- }
25
- faceted_search_update_settings_1 : |-
26
- See cURL: https://github.com/meilisearch/documentation/blob/5ec3df3844f603f0958d91a0c5cfc38bc57656af/.code-samples.meilisearch.yaml#L1018-L1024
27
- on the books index: Add "genres", "rating", "language" as filterable attributes
28
- faceted_search_1 : |-
29
- See cURL: https://github.com/meilisearch/documentation/blob/5ec3df3844f603f0958d91a0c5cfc38bc57656af/.code-samples.meilisearch.yaml#L1025-L1034
30
- Search books index with data: {
31
- "q": "classic",
32
- "facets": [
33
- "genres", "rating", "language"
34
- ]
35
- }
36
- search_parameter_guide_facet_stats_1 : |-
37
- See cURL: https://github.com/meilisearch/documentation/blob/5ec3df3844f603f0958d91a0c5cfc38bc57656af/.code-samples.meilisearch.yaml#L1035-L1042
38
- search movie_ratings index with data: '{
39
- "q": "Batman",
40
- "facets": ["genres", "rating"]
41
- }
42
- faceted_search_2 : |-
43
- see cURL: https://github.com/meilisearch/documentation/blob/5ec3df3844f603f0958d91a0c5cfc38bc57656af/.code-samples.meilisearch.yaml#L1043-L1065
44
- multi-search with data: {
45
- "queries": [
46
- {
47
- "indexUid": "books",
48
- "facets": ["language", "genres", "author", "format"],
49
- "filter": [["language = English", "language = French"], ["genres = Fiction"]]
50
- },
51
- {
52
- "indexUid": "books",
53
- "facets": ["language"],
54
- "filter": [["genres = Fiction"]]
55
- },
56
- {
57
- "indexUid": "books",
58
- "facets": ["genres"],
59
- "filter": [["language = English", "language = French"]]
60
- }
61
- ]
62
- }
63
- geosearch_guide_filter_usage_3 : |-
64
- see cURL: https://github.com/meilisearch/documentation/blob/c8ab47d004753ce2241a756eff14ade448d70a93/.code-samples.meilisearch.yaml#L696-L700
65
- Search on `restaurants` with data:
66
- '{ "filter": "_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])" }'
67
-
68
6
get_one_index_1 : |-
69
7
client.get_index('movies')
70
8
list_all_indexes_1 : |-
@@ -107,6 +45,14 @@ delete_documents_1: |-
107
45
client.index('movies').delete_documents([23488, 153738, 437035, 363869])
108
46
search_post_1 : |-
109
47
client.index('movies').search('American ninja')
48
+ multi_search_1 : |-
49
+ client.multi_search(
50
+ [
51
+ {'indexUid': 'movies', 'q': 'pooh', 'limit': 5},
52
+ {'indexUid': 'movies', 'q': 'nemo', 'limit': 5},
53
+ {'indexUid': 'movie_ratings', 'q': 'us'}
54
+ ]
55
+ )
110
56
get_all_tasks_1 : |-
111
57
client.get_tasks()
112
58
get_task_1 : |-
@@ -372,6 +318,14 @@ search_parameter_guide_hitsperpage_1: |-
372
318
client.index('movies').search('', {'hitsPerPage': 15})
373
319
search_parameter_guide_page_1 : |-
374
320
client.index('movies').search('', {'page': 2})
321
+ search_parameter_guide_sort_1 : |-
322
+ client.index('books').search('science fiction', {
323
+ 'sort': ['price:asc']
324
+ })
325
+ search_parameter_guide_facet_stats_1 : |-
326
+ client.index('movie_ratings').search('Batman', {
327
+ 'facets': ['genres', 'rating']
328
+ })
375
329
settings_guide_synonyms_1 : |-
376
330
client.index('tops').update_settings({
377
331
'synonyms': {
@@ -589,6 +543,36 @@ faceted_search_walkthrough_filter_1: |-
589
543
client.index('movies').search('thriller', {
590
544
'filter': [['genres = Horror', 'genres = Mystery'], 'director = "Jordan Peele"']
591
545
})
546
+ faceted_search_update_settings_1 : |-
547
+ client.index('books').update_filterable_attributes([
548
+ 'genres',
549
+ 'director',
550
+ 'language'
551
+ ])
552
+ faceted_search_1 : |-
553
+ client.index('books').search('classic', {
554
+ 'facets': ['genres', 'rating', 'language']
555
+ })
556
+ faceted_search_2 : |-
557
+ client.multi_search(
558
+ [
559
+ {
560
+ 'indexUid': 'books',
561
+ 'facets': ['language', 'genres', 'author', 'format'],
562
+ 'filter': [['language = English', 'language = French'], ['genres = Fiction']]
563
+ },
564
+ {
565
+ 'indexUid': 'books',
566
+ 'facets': ['language'],
567
+ 'filter': [['genres = Fiction']]
568
+ },
569
+ {
570
+ 'indexUid': 'books',
571
+ 'facets': ['genres'],
572
+ 'filter': [['language = English', 'language = French']]
573
+ },
574
+ ]
575
+ )
592
576
post_dump_1 : |-
593
577
client.create_dump()
594
578
phrase_search_1 : |-
@@ -615,10 +599,6 @@ sorting_guide_sort_parameter_2: |-
615
599
client.index('books').search('butler', {
616
600
'sort': ['author:desc']
617
601
})
618
- search_parameter_guide_sort_1 : |-
619
- client.index('books').search('science fiction', {
620
- 'sort': ['price:asc']
621
- })
622
602
geosearch_guide_filter_settings_1 : |-
623
603
client.index('restaurants').update_filterable_attributes([
624
604
'_geo'
@@ -643,6 +623,10 @@ geosearch_guide_sort_usage_2: |-
643
623
client.index('restaurants').search('', {
644
624
'sort': ['_geoPoint(48.8561446,2.2978204):asc', 'rating:desc']
645
625
})
626
+ geosearch_guide_filter_usage_3 : |-
627
+ client.index('restaurants').search('Batman', {
628
+ 'filter': '_geoBoundingBox([45.494181, 9.179175], [45.449484, 9.214024])'
629
+ })
646
630
primary_field_guide_update_document_primary_key : |-
647
631
client.index('books').update(primary_key='title')
648
632
primary_field_guide_create_index_primary_key : |-
0 commit comments