@@ -19,7 +19,7 @@ class QueryTests: XCTestCase {
19
19
. set ( \. explainModules, to: [ . matchAlternatives] )
20
20
. set ( \. attributesToRetrieve, to: [ " attr1 " , " attr2 " , " attr3 " ] )
21
21
. set ( \. restrictSearchableAttributes, to: [ " rattr1 " , " rattr2 " ] )
22
- . set ( \. filters, to: " (color:red OR color:yellow) AND on-sale AND 12+ " )
22
+ . set ( \. filters, to: " (color:red OR color:yellow) AND on-sale AND 12+ AND (test: \" Hello & World \" ) " )
23
23
. set ( \. facetFilters, to: [ . or( " color:red " , " color:blue " ) , " size:M " ] )
24
24
. set ( \. optionalFilters, to: [ . or( " color:red " , " color:yellow " ) , " on-sale " ] )
25
25
. set ( \. numericFilters, to: [ . or( " price>100 " , " length<1000 " ) , " metrics>5 " ] )
@@ -93,23 +93,23 @@ class QueryTests: XCTestCase {
93
93
" distinct=5 " ,
94
94
" getRankingInfo=true " ,
95
95
" explainModules=match.alternatives " ,
96
- " attributesToRetrieve=attr1,attr2,attr3 " ,
97
- " restrictSearchableAttributes=rattr1,rattr2 " ,
98
- " filters=(color:red% 20OR%20color:yellow)% 20AND%20on-sale%20AND%2012%2B " ,
99
- " facetFilters=%5B%5B%22color:red%22,% 22color:blue% 22%5D,% 22size:M %22%5D " ,
100
- " optionalFilters=%5B%5B%22color:red%22,% 22color:yellow% 22%5D, %22on-sale%22%5D " ,
101
- " numericFilters=%5B%5B%22price%3E100%22,% 22length%3C1000%22%5D, %22metrics%3E5%22%5D " ,
102
- " tagFilters=%5B%5B%22tag1%22,% 22tag2%22%5D, %22tag3%22%5D " ,
96
+ " attributesToRetrieve=attr1%2Cattr2%2Cattr3 " ,
97
+ " restrictSearchableAttributes=rattr1%2Crattr2 " ,
98
+ " filters=%28color%3Ared% 20OR%20color%3Ayellow%29% 20AND%20on-sale%20AND%2012%2B%20AND%20%28test%3A%22Hello%20%26%20World%22%29 " ,
99
+ " facetFilters=%5B%5B%22color%3Ared%22%2C% 22color%3Ablue% 22%5D%2C% 22size%3AM %22%5D " ,
100
+ " optionalFilters=%5B%5B%22color%3Ared%22%2C% 22color%3Ayellow% 22%5D%2C %22on-sale%22%5D " ,
101
+ " numericFilters=%5B%5B%22price%3E100%22%2C% 22length%3C1000%22%5D%2C %22metrics%3E5%22%5D " ,
102
+ " tagFilters=%5B%5B%22tag1%22%2C% 22tag2%22%5D%2C %22tag3%22%5D " ,
103
103
" sumOrFiltersScores=false " ,
104
- " facets=facet1,facet2,facet3 " ,
104
+ " facets=facet1%2Cfacet2%2Cfacet3 " ,
105
105
" maxValuesPerFacet=10 " ,
106
106
" facetingAfterDistinct=true " ,
107
107
" sortFacetValuesBy=count " ,
108
108
" maxFacetHits=100 " ,
109
- " attributesToHighlight=hattr1,hattr2,hattr3 " ,
110
- " attributesToSnippet=sattr1:10,sattr2 " ,
109
+ " attributesToHighlight=hattr1%2Chattr2%2Chattr3 " ,
110
+ " attributesToSnippet=sattr1%3A10%2Csattr2 " ,
111
111
" highlightPreTag=%3Chl%3E " ,
112
- " highlightPostTag=%3C/hl %3E " ,
112
+ " highlightPostTag=%3C%2Fhl %3E " ,
113
113
" snippetEllipsisText=read%20more " ,
114
114
" restrictHighlightAndSnippetArrays=true " ,
115
115
" page=15 " ,
@@ -120,41 +120,41 @@ class QueryTests: XCTestCase {
120
120
" minWordSizefor2Typos=4 " ,
121
121
" typoTolerance=strict " ,
122
122
" allowTyposOnNumericTokens=false " ,
123
- " disableTypoToleranceOnAttributes=dtattr1,dtattr2 " ,
124
- " aroundLatLng=79.5,10 .5 " ,
123
+ " disableTypoToleranceOnAttributes=dtattr1%2Cdtattr2 " ,
124
+ " aroundLatLng=79.5%2C10 .5 " ,
125
125
" aroundLatLngViaIP=true " ,
126
126
" aroundRadius=80 " ,
127
- " aroundPrecision=%5B%7B%22from%22:0,% 22value%22:1000%7D,% 7B%22from%22:0,% 22value%22:100000 %7D%5D " ,
127
+ " aroundPrecision=%5B%7B%22from%22%3A0%2C% 22value%22%3A1000%7D%2C% 7B%22from%22%3A0%2C% 22value%22%3A100000 %7D%5D " ,
128
128
" minimumAroundRadius=40 " ,
129
- " insideBoundingBox=%5B%5B0.0,10.0,20.0,30 .0%5D,% 5B40.0,50.0,60.0,70 .0%5D%5D " ,
130
- " insidePolygon=%5B%5B0.0,10.0,20.0,30.0,40.0,50 .0%5D,% 5B10.0,20.0,30.0,40.0,50.0,60 .0%5D%5D " ,
129
+ " insideBoundingBox=%5B%5B0.0%2C10.0%2C20.0%2C30 .0%5D%2C% 5B40.0%2C50.0%2C60.0%2C70 .0%5D%5D " ,
130
+ " insidePolygon=%5B%5B0.0%2C10.0%2C20.0%2C30.0%2C40.0%2C50 .0%5D%2C% 5B10.0%2C20.0%2C30.0%2C40.0%2C50.0%2C60 .0%5D%5D " ,
131
131
" queryType=prefixLast " ,
132
132
" removeWordsIfNoResults=lastWords " ,
133
133
" advancedSyntax=false " ,
134
- " advancedSyntaxFeatures=exactPhrase,excludeWords " ,
135
- " optionalWords=optWord1,optWord2 " ,
136
- " removeStopWords=ar,fr " ,
137
- " disableExactOnAttributes=deAttr1,deAttr2 " ,
134
+ " advancedSyntaxFeatures=exactPhrase%2CexcludeWords " ,
135
+ " optionalWords=optWord1%2CoptWord2 " ,
136
+ " removeStopWords=ar%2Cfr " ,
137
+ " disableExactOnAttributes=deAttr1%2CdeAttr2 " ,
138
138
" exactOnSingleWordQuery=word " ,
139
- " alternativesAsExact=ignorePlurals,singleWordSynonym " ,
139
+ " alternativesAsExact=ignorePlurals%2CsingleWordSynonym " ,
140
140
" ignorePlurals=false " ,
141
- " queryLanguages=hi,sq " ,
141
+ " queryLanguages=hi%2Csq " ,
142
142
" decompoundQuery=false " ,
143
143
" enableRules=true " ,
144
- " ruleContexts=rc1,rc2 " ,
144
+ " ruleContexts=rc1%2Crc2 " ,
145
145
" enablePersonalization=false " ,
146
146
" personalizationImpact=5 " ,
147
147
" userToken=testUserToken " ,
148
148
" analytics=true " ,
149
- " analyticsTags=at1,at2,at3 " ,
149
+ " analyticsTags=at1%2Cat2%2Cat3 " ,
150
150
" enableABTest=false " ,
151
151
" clickAnalytics=true " ,
152
152
" synonyms=false " ,
153
153
" replaceSynonymsInHighlight=true " ,
154
154
" minProximity=3 " ,
155
- " responseFields=facets_stats,hits " ,
155
+ " responseFields=facets_stats%2Chits " ,
156
156
" percentileComputation=false " ,
157
- " naturalLanguages=mi,ta " ,
157
+ " naturalLanguages=mi%2Cta " ,
158
158
" enableReRanking=true " ,
159
159
" custom1=val1 " ,
160
160
" custom2=2.0 " ,
@@ -189,7 +189,7 @@ class QueryTests: XCTestCase {
189
189
" explainModules " : [ " match.alternatives " ] ,
190
190
" attributesToRetrieve " : [ " attr1 " , " attr2 " , " attr3 " ] ,
191
191
" restrictSearchableAttributes " : [ " rattr1 " , " rattr2 " ] ,
192
- " filters " : " (color:red OR color:yellow) AND on-sale AND 12+ " ,
192
+ " filters " : " (color:red OR color:yellow) AND on-sale AND 12+ AND (test: \" Hello & World \" ) " ,
193
193
" facetFilters " : [ [ " color:red " , " color:blue " ] , " size:M " ] ,
194
194
" optionalFilters " : [ [ " color:red " , " color:yellow " ] , " on-sale " ] ,
195
195
" numericFilters " : [ [ " price>100 " , " length<1000 " ] , " metrics>5 " ] ,
0 commit comments