Skip to content

Commit

Permalink
Added testing of boost
Browse files Browse the repository at this point in the history
  • Loading branch information
darkfrog26 committed Aug 10, 2024
1 parent 191e283 commit 479f113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/test/scala/spec/AbstractBasicSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
Expand Down

0 comments on commit 479f113

Please sign in to comment.