SortingLeafReader and IndexWriter.addIndexes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SortingLeafReader and IndexWriter.addIndexes

John Wang-9
Hi folks:

I am interested in using the SortingLeafReader to sort my index. According to examples, calling IndexWriter.addIndexes on the wrapper SortingLeafReader would do the trick.

In the recent releases, IndexWriter.addIndexes api is now only taking a CodecReader. Is there another way to do indexing sorting?

Appreciate any help.

Thanks

-John
Reply | Threaded
Open this post in threaded view
|

Re: SortingLeafReader and IndexWriter.addIndexes

Adrien Grand
Hi John,

Javadocs are outdated indeed. You can use SlowCodecReaderWrapper.wrap to make the sorting reader implement the codec reader API.

Le mer. 16 déc. 2015 à 02:58, John Wang <[hidden email]> a écrit :
Hi folks:

I am interested in using the SortingLeafReader to sort my index. According to examples, calling IndexWriter.addIndexes on the wrapper SortingLeafReader would do the trick.

In the recent releases, IndexWriter.addIndexes api is now only taking a CodecReader. Is there another way to do indexing sorting?

Appreciate any help.

Thanks

-John
Reply | Threaded
Open this post in threaded view
|

Re: SortingLeafReader and IndexWriter.addIndexes

John Wang-9
Thanks Adrien!

-John

On Wed, Dec 16, 2015 at 1:09 AM, Adrien Grand <[hidden email]> wrote:
Hi John,

Javadocs are outdated indeed. You can use SlowCodecReaderWrapper.wrap to make the sorting reader implement the codec reader API.

Le mer. 16 déc. 2015 à 02:58, John Wang <[hidden email]> a écrit :
Hi folks:

I am interested in using the SortingLeafReader to sort my index. According to examples, calling IndexWriter.addIndexes on the wrapper SortingLeafReader would do the trick.

In the recent releases, IndexWriter.addIndexes api is now only taking a CodecReader. Is there another way to do indexing sorting?

Appreciate any help.

Thanks

-John