I have installed Marklogic 8 on my 8GB RAM machine and have 10 Million documents inserted to it. I am using Java API to query the database and get first 1000 matched documents.My Query(Rawcombined Query) involves 2 PathRange indexed JSON attributes and one Word query. When i logged the time taken in my java program, search function takes 20seconds to get the 1000 documents.
Can anyone please let me know what could be the factors that drive these type of performance hit?