0
votes

In my test environment, there are nearly 130,000,000 documents on each server. It works fast if I do a search without sorting by date, but extremly slow if sorting is enabled.

I think if the solr can sort an indexed field while creating index, searching would be more efficient. So, how to configure the solr to sort some fields while indexing?

1
You didn't say if you've indexed the documents using solr. You might also want to give a bit of context of the kind of queries you'll like to perform on the documents. - rrufai
I have indexed all the 130,000,000 docs by solr. All of them are full-text doc, and our queries are simple - get the latest 6 docs. - Xu Dong

1 Answers

0
votes

The initial query would be slower but all the subsequent queries should be fast.
Solr should be able to use the Filter Query Cache for sorting.

You can also warm the sort fields.
Also check if the overhead is also just cause of sorting and there is no querying and scoring involved.