0

I was looking for a way to get all the documents of indexed-field through mongodb text-search.

Though I tried approaches of using regular expressions given below but it's not working. Please suggest.

db.docs.find( { $text: { $search: ".*" } } )
Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
kaushik_pm
  • 295
  • 3
  • 10
  • 1
    Please find from this link answer. https://stackoverflow.com/questions/24343156/mongodb-prefix-wildcard-fulltext-search-text-find-part-with-search-string – Ravi Aug 28 '19 at 13:12
  • @Ravi that is a workaround approach using either textsearch or regex search. But I am looking for solution which is exclusive to textsearch – kaushik_pm Aug 29 '19 at 05:49

0 Answers0