-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
Hello, I have the following query that works in mongo using a client, it uses an or operator which combines the result of a text index and a normal attribute.
db.getCollection('person')
.find(
{$or: [ { "hrNumber": "123"} , { $text: { $search: "123" } }] } )
However, I cannot create a query using the opOperator, because it only accepts Criteria and not TextCriteria. Why is that restriction? It is a feature that is not supported or there is another way create the query as described below?
val query= org.springframework.data.mongodb.core.query.Query()
query.addCriteria(Criteria().orOperator( textCriteria, hrNumberCriteria))
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue