How to index text file having size more than the system memory

Hi Clinton,
If I break down the document in smaller document then how it will be indexed as i mean it will index as an separate document.
and one question any other way to speed up the indexing a documents. How can i calculate the time for indexing ? which method curl (REST API) or JAVA transport client is efficient way to indexing documents? Is curl command works as distributed or single node? How can i index document in distributed manner?

Thanks in advance !!!!

Sanjay