From 479f11387bde7bc94b06ffc91d55e52f25364455 Mon Sep 17 00:00:00 2001 From: Matt Hicks Date: Sat, 10 Aug 2024 09:55:00 -0500 Subject: [PATCH] Added testing of boost --- core/src/test/scala/spec/AbstractBasicSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/scala/spec/AbstractBasicSpec.scala b/core/src/test/scala/spec/AbstractBasicSpec.scala index 25cd3a59..1f672680 100644 --- a/core/src/test/scala/spec/AbstractBasicSpec.scala +++ b/core/src/test/scala/spec/AbstractBasicSpec.scala @@ -202,12 +202,12 @@ abstract class AbstractBasicSpec extends AnyWordSpec with Matchers { spec => db.people.transaction { implicit transaction => val results = db.people.query.scored.filter(p => Filter .Builder() - .should(p.search.words("nica 13")) + .should(p.search.words("nica 13"), boost = Some(2.0)) .should(p.age <=> (10, 15)) ).search.docs val people = results.list people.map(_.name) should be(List("Veronica", "Brenda", "Diana", "Greg", "Charlie", "Evan", "Fiona", "Hanna", "Ian", "Jenna", "Kevin", "Mike", "Nancy", "Oscar", "Penny", "Quintin", "Ruth", "Sam", "Tori", "Uba", "Wyatt", "Xena", "Zoey", "Allan")) - results.scores should be(List(3.330336093902588, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)) + results.scores should be(List(4.660672187805176, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)) } } }