Some details: I plan to use MongoDB as the external db interface for several of my websites. The actual data will be stored in the SQL Server db database and background jobs will run that will populate MongoDB at predefined time intervals for readonly purposes to improve site performance.
Situation: I have a table "x" that I transferred to the mongo collection, everything worked fine.
'x' has a column 'c', which was originally NVARCHAR (MAX) in the original db and contained multilingual text.
When I searched for the 'c' column, mongo did fullscan in the collection.
So I tried to execute makeIndex ({c: 1}), which worked, but when I checked the mongodb logs, it showed me that 90% of the data could not be indexed as [The key is too large for the index] !!
And so he indexed 10% of the data and now only returns the results from that 10% !!
What are my alternatives?
Note: I used this column for full-text search in SQL Server, now I'm not sure if I should go ahead with Mongo or not :(
source share