This could be because of the limit of word positions we store in the engine as explained below.
More details can found in this internal doc.
When Algolia indexes documents, it keeps the 1000 first positions of each words. Every word is indexed meaning words after the position 1000 can be found.
But when using a phrase query, for example "foo bar baz" , the search API tries to match the position of the words next to each other. But it won't work for sequences of words after the position 1000.
This is a limitation of the engine and this is one of the reason why we recommend to split large documents on different records.