File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
main/scala/algolia/objects Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ case class Query(
210210 /* Search */
211211 " query" -> query,
212212 " facetQuery" -> facetQuery,
213+ " similarQuery" -> similarQuery,
213214 /* Typos */
214215 " minWordSizefor1Typo" -> minWordSizefor1Typo.map(_.toString),
215216 " minWordSizefor2Typos" -> minWordSizefor2Typos.map(_.toString),
Original file line number Diff line number Diff line change @@ -272,4 +272,18 @@ class SearchTest extends AlgoliaTest {
272272 }
273273 }
274274
275+ describe(" search with similarQuery" ) {
276+ it(" should parametrize stuff" ) {
277+ val q = Query (
278+ query = Some (" " ),
279+ similarQuery = Some (" \" test phrase\" " ),
280+ advancedSyntax = Some (true ),
281+ advancedSyntaxFeatures = Some (Seq (" exactPhrase" ))
282+ )
283+
284+ q.toParam should be(
285+ " advancedSyntax=true&query=&advancedSyntaxFeatures=exactPhrase&similarQuery=%22test+phrase%22"
286+ )
287+ }
288+ }
275289}
You can’t perform that action at this time.
0 commit comments