Any thoughts? On Monday, February 29, 2016, Gimantha Bandara <giman...@wso2.com> wrote:
> Hi all, > > We are using lucene to index our data and are maintaining millions of > documents in sharded indices. Currently what we do is, reading each shard > separately and collecting the TopDocs using TopDocCollector then sort them > by the score and returning the Top scored Documents. I think using the > MultiReader can replace this logic. > > But I have some questions regarding sorting by a specific field/fields. > > 1. Does lucene sort at the search time or does it store sort information > at the index time in some way? > > 2. How would I implement pagination for a sorted set of documents? I have > several shards and each shard may contain millions of records.getting the > first few pages, each page having 100 documents or so may be fine. But lets > say I want to get the 1000th page. I have to sort the whole document sets > of all the shards and get the 1000th page once all the documents are > sorted. Does Lucene support pagination? > > Help is much appreciated. > -- > Gimantha Bandara > Software Engineer > WSO2. Inc : http://wso2.com > Mobile : +94714961919 > -- Gimantha Bandara Software Engineer WSO2. Inc : http://wso2.com Mobile : +94714961919