简体   繁体   中英

How can I divide an index in lucene?

I need to divide an index in two ones randomly in order to get an index for training and other for testing. How can I do that?

Thanks

I'm not sure I understand what you mean by dividing the index, but

To create a copy of the index, you can simply copy the entire index directory to a new location. Make sure the index is not currently in use when you create the copy (that is, no IndexReaders or IndexWriters are currently open on it), as that can lead to locking issues on the new copy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM