How to perform a full text search in MongoDb with C#? -


i'm using latest mongodb api.

i have entity

class entity {     objectid id {get;set;}     string text {get;set;} }   //create text index     entitycollection.indexes.createoneasync(indexkeys<entity>.textall().tobsondocument()); 

i can see index presents in db, when i'm trying perform search in mongovue query

{ $text: {$search: '<existent-word>'}} 

so receive nothing.

maybe need rebuild index in way? how c#?

how perform full text search functionality sorting relevance (score) in c#?

update. ind

[         {                 "v" : 1,                 "key" : {                         "_id" : 1                 },                 "name" : "_id_",                 "ns" : "db.entities"         },         {                 "v" : 1,                 "key" : {                         "_fts" : "text",                         "_ftsx" : 1                 },                 "name" : "$**_text",                 "ns" : "db.entities",                 "weights" : {                         "$**" : 1                 },                 "default_language" : "english",                 "language_override" : "language",                 "textindexversion" : 2         } ] 


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -