File tree 2 files changed +9
-4
lines changed
spec/meilisearch/index/search 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 12
12
response = index . search ( 'prinec' , facets : [ 'genre' , 'author' ] )
13
13
expect ( response . keys ) . to contain_exactly (
14
14
*DEFAULT_SEARCH_RESPONSE_KEYS ,
15
- 'facetDistribution'
15
+ 'facetDistribution' ,
16
+ 'facetStats'
16
17
)
17
18
expect ( response [ 'estimatedTotalHits' ] ) . to eq ( 2 )
18
19
expect ( response [ 'facetDistribution' ] . keys ) . to contain_exactly ( 'genre' , 'author' )
27
28
response = index . search ( '' , facets : [ 'genre' , 'author' ] )
28
29
expect ( response . keys ) . to contain_exactly (
29
30
*DEFAULT_SEARCH_RESPONSE_KEYS ,
30
- 'facetDistribution'
31
+ 'facetDistribution' ,
32
+ 'facetStats'
31
33
)
32
34
expect ( response [ 'estimatedTotalHits' ] ) . to eq ( documents . count )
33
35
expect ( response [ 'facetDistribution' ] . keys ) . to contain_exactly ( 'genre' , 'author' )
42
44
response = index . search ( '' , facets : [ 'year' ] )
43
45
expect ( response . keys ) . to contain_exactly (
44
46
*DEFAULT_SEARCH_RESPONSE_KEYS ,
45
- 'facetDistribution'
47
+ 'facetDistribution' ,
48
+ 'facetStats'
46
49
)
47
50
expect ( response [ 'estimatedTotalHits' ] ) . to eq ( documents . count )
48
51
expect ( response [ 'facetDistribution' ] . keys ) . to contain_exactly ( 'year' )
Original file line number Diff line number Diff line change 66
66
response = index . update_filterable_attributes ( [ 'genre' ] )
67
67
index . wait_for_task ( response [ 'taskUid' ] )
68
68
response = index . search ( 'prinec' , facets : [ 'genre' ] , limit : 1 )
69
+
69
70
expect ( response . keys ) . to contain_exactly (
70
71
*DEFAULT_SEARCH_RESPONSE_KEYS ,
71
- 'facetDistribution'
72
+ 'facetDistribution' ,
73
+ 'facetStats'
72
74
)
73
75
expect ( response [ 'estimatedTotalHits' ] ) . to eq ( 2 )
74
76
expect ( response [ 'hits' ] . count ) . to eq ( 1 )
You can’t perform that action at this time.
0 commit comments