I created a MongoDB text index using R programming.
library(mongolite)
library(jsonlite)
mn <- mongo(collection = "collname", db = "dbname", url = "mongodb://localhost:27017" )
mn$index(toJSON(list("title" = "text"), auto_unbox = TRUE))
I am trying to do MongoDB text search in R for the below code.
mn$find(toJSON(list("$text" = list("$search" = "STORAGE")), auto_unbox = TRUE))
But, I got an output as "data frame with 0 columns and 0 rows".