What are the memory requirements for the document search API?

What are the memory requirements for Groupdocs Search? We have a virtual machine running Windows 2012 R2 with 4 GB ram and a pagefile of 2 GB. When performing indexing or during some searches the server generates the following message:
Windows successfully diagnosed a low virtual memory condition.

@nsanoir

There are no specific hardware requirements. However, API processing depends on nature of the documents as well. If you have a lot of files and indexed data is too large. API may consume more memory.
Could you please share the sample code and files (if not possible, please share size of the document folder and index folder)? Also, specify the API version (e.g. 20.10, 21.1) that you are using.