I tried searching text using the condition { $text: { $search: searchContent } }
. This requires a text index. However, text index is not supported by time series . What can I do?
I tried searching text using the condition { $text: { $search: searchContent } }
. This requires a text index. However, text index is not supported by time series . What can I do?
2
Answers
Try using
{"field": {"$regex": "value-to-search"}}
as your query, this is the closest to a text search without using one, as you mentioned it is not supported and according to the link you provided it probably will not be.If you know field what you find, you could use
$regex
same @omercotkd suggest. Here, I use$where
for the case that you want to search on all field.