c# - MongoDB geonear and text commands driver 2.0 -


i'm wondering how go performing geonear , full text queries (not in same query) in mongodb using new .net 2.0 driver?

i can't seem find information on relating new driver.

you used able use query.text , mycollection.geonear methods, these don't seem exist anymore.

can please point me in direction of documentation, examples or information?

text queries, q being query string:

coll.findasync<foo>(builders<foo>.filter.text(q)); 

text queries need text index. create c#,

coll.indexes.createoneasync(builders<foo>.indexkeys.text(p => p.message)); 

near queries:

coll.findasync<foo>(builders<foo>.filter.near(p => p.location, x, y, maxdis, mindis)); coll.findasync<foo>(builders<foo>.filter.near(p => p.location, 5, 5, 100, 0)); 

again, these need index:

coll.indexes.createoneasync(builders<foo>.indexkeys.geo2d(p => p.location)); 

Comments