As a quick preliminary note: You should generally give some more details and examples around your specific problem. However, this one can probably be answered without that. ;)
You are dealing with a text (!) index here. That means that there is quite some work done on the MongoDB server side when it creates the index; work that goes well beyond the sheer string.split()
sort of thing that one would probably expect.
The most important things to understand is that the index will not necessarily hold all values that your text contains (e.g. common words like "and" or "the" may simply be omitted) and neither will it necessarily contain the exact words that you can read in your source data but rather word stems. A very good explanation on some of the stuff that's going on here can be found here: https://blog.codecentric.de/en/2013/01/text-search-mongodb-stemming/
There's more inside the index engine that deals with languages and special characters. But that's all reasonably well documented here and here.
Lastly, when you search for a string with spaces inside a field that's covered by a text index, the following part of the documentation is also relevant to understand:
$text will tokenize the search string using whitespace and most
punctuation as delimiters, and perform a logical OR of all such tokens
in the search string.
For example, you could use the following query to find all stores
containing any terms from the list “coffee”, “shop”, and “java”:
db.stores.find( { $text: { $search: "java coffee shop" } } )
The bottom line is: There's quite a bunch of sources of potential confusion when it comes to text indexes so you want to make sure you've read up on them before you get going.