Hi all,how to retrieve the maximum id for one type index effectively?
What I only know is to search with sort on the id field but in production
there are millions of documents in the index so this approach may suffer
from the penalty on performance.
Could someone share your best practice for this issue?
If your _id is a numeric value, you can use the Custom Score query, which
should be faster:
Otherwise, I think you're stuck with sorting. Unless you specify the ID, ES
assigns a random one for you. Therefore, sorting IDs is pretty much like
sorting any other field.
Hi all,how to retrieve the maximum id for one type index effectively?
What I only know is to search with sort on the id field but in production
there are millions of documents in the index so this approach may suffer
from the penalty on performance.
Could someone share your best practice for this issue?
Otherwise, I think you're stuck with sorting. Unless you specify the ID,
ES assigns a random one for you. Therefore, sorting IDs is pretty much like
sorting any other field.
On Mon, Dec 17, 2012 at 4:29 PM, SuoNayi <suo...@gmail.com <javascript:>>wrote:
Hi all,how to retrieve the maximum id for one type index effectively?
What I only know is to search with sort on the id field but in production
there are millions of documents in the index so this approach may suffer
from the penalty on performance.
Could someone share your best practice for this issue?
thanks guys, I am doing a performance test on them and if there already
exist some performance tests on them please tell me.
I'm only measuring them by writing index performance and it's hard to do
search index compare because there are many search approaches.
What I'm really to do is a choice decision between solrcloud and es.
Otherwise, I think you're stuck with sorting. Unless you specify the ID,
ES assigns a random one for you. Therefore, sorting IDs is pretty much like
sorting any other field.
On Mon, Dec 17, 2012 at 4:29 PM, SuoNayi suo...@gmail.com wrote:
Hi all,how to retrieve the maximum id for one type index effectively?
What I only know is to search with sort on the id field but in
production there are millions of documents in the index so this approach
may suffer from the penalty on performance.
Could someone share your best practice for this issue?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.