[JAVA-3571] Fix SortsFunctionalSpecification.metaTextScore Created: 27/Dec/19  Updated: 28/Oct/23  Resolved: 27/Dec/19

Status: Closed
Project: Java Driver
Component/s: Test Coverage
Affects Version/s: None
Fix Version/s: 3.12.1

Type: Improvement Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

SortsFunctionalSpecification.metaTextScore has started failing on latest server builds.

Need to investigate why and either fix the test or report a server bug.

FAILURE: Condition failed with Exception:
 
find(metaTextScore('score'), new Document('score', new Document('$meta', 'textScore')))*.containsKey('score')
|    |                       |                     |
|    |                       |                     [$meta:textScore]
|    |                       [score:[$meta:textScore]]
|    [score:[$meta:BsonString{value='textScore'}]]
com.mongodb.MongoQueryException: Query failed with error code 40218 and error message 'query requires text score metadata, but it is not available' on server localhost:27017
 (org.spockframework.runtime.ConditionFailedWithExceptionError)
Condition failed with Exception:
 
find(metaTextScore('score'), new Document('score', new Document('$meta', 'textScore')))*.containsKey('score')
|    |                       |                     |
|    |                       |                     [$meta:textScore]
|    |                       [score:[$meta:textScore]]
|    [score:[$meta:BsonString{value='textScore'}]]
com.mongodb.MongoQueryException: Query failed with error code 40218 and error message 'query requires text score metadata, but it is not available' on server localhost:27017
 
	at com.mongodb.client.model.SortsFunctionalSpecification.metaTextScore(SortsFunctionalSpecification.groovy:69)
Caused by: com.mongodb.MongoQueryException: Query failed with error code 40218 and error message 'query requires text score metadata, but it is not available' on server localhost:27017

First failure at https://evergreen.mongodb.com/version/mongo_java_driver_b28be53f50c362adecd15a857febc3d70fcd11e3



 Comments   
Comment by Githook User [ 08/Jan/20 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Fix functional test of Filters.metaTextScore

Add a $text query filter, which is required starting in MongoDB 4.4.

JAVA-3571
Branch: 3.12.x
https://github.com/mongodb/mongo-java-driver/commit/da844efbb2a959ca18cf20be8730ef454bab9850

Comment by Githook User [ 27/Dec/19 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}

Message: Fix functional test of Filters.metaTextScore

Add a $text query filter, which is required starting in MongoDB 4.4.

JAVA-3571
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/12d45e9263f29934ea1a50232286de4e211b42e8

Generated at Thu Feb 08 08:59:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.