Re: remapping docIds in a read only offline built index

2014-06-02 Thread Olivier Binda
Hello, I'm still interested in having the answer to the following question : In a 1-segment read-only index (that is built offline once and then frozen), is it possible to remap the docIds ? I may have a (working but not optimal) answer to my original problem : I may use a MultiReader and

Re: remapping docIds in a read only offline built index

2014-06-02 Thread Michael McCandless
The index sorting APIs (in lucene/misc) can do this. E.g. you could make a SortingAtomicReader, with your sort criteria, then use addIndexes(IR[]) to add it to a new index. That resulting index would have 1 segment and the docIDs would be in your order. Mike McCandless

Re: remapping docIds in a read only offline built index

2014-06-02 Thread Olivier Binda
Very nice ! That is exactly what I needed. Thank you very much ! On 06/02/2014 09:26 AM, Michael McCandless wrote: The index sorting APIs (in lucene/misc) can do this. E.g. you could make a SortingAtomicReader, with your sort criteria, then use addIndexes(IR[]) to add it to a new index. That

remapping docIds in a read only offline built index

2014-05-12 Thread Olivier Binda
In a 1-segment (parallel) read-only index, that is built offline once (and then frozen), is it possible to remap the docIds as the last step (i.e... to have the exact same index, except that the docIds are all equal to the ord the docs where added to the index) ? Say I have the read only