Juanchi
Juanchi

Reputation: 41

How search with strength in mgo Golang

basically i have this query that searches from an array of names...now i want to make it case insensitive

in GO

err = c.Find(bson.M{
        "name": bson.M{
            "$in": names,
        },
    }).All(&res)

Result search by Raíz name

1 document

search by raíz name 0 document

I would like the query to be something like this:

db.getCollection('g-se_tags').find({'name':'raíz', }).collation( { locale: "es", strength: 1 } )

Result search by Raíz name

1 document

search by raíz name 1 document

Upvotes: 3

Views: 38

Answers (0)

Related Questions