Ilion
Ilion

Reputation: 6882

Exporting a range of documents from solr including both indexed and stored data

I have a couple of solr instances, one with 4 million and one with 8 million documents, that I want to break up and move to a new solr environment. I'd like to export ranges of documents so that eventually I can have a set of instances with about 1 million documents each. I've read about simply copying the index files and looked at tools like luke but the first option forces me to copy everything and while the second provides a range option, it only outputs the fields I have stored not the ones I have indexed.

Are there any tools that would allow me to export a range of complete documents that I can then import into another solr instance?

Upvotes: 0

Views: 582

Answers (2)

Persimmonium
Persimmonium

Reputation: 15789

In order to just 'export' you could use the CSVResponseWriter, into csv that later you can index in another instance, but it will not include not stored field obviously.

But if you are looking to partition your index into smaller indexes, look at IndexSplitter, see more info in this question

Upvotes: 0

user1452132
user1452132

Reputation: 1768

This is a common way to split Solr indexes splitting lucene index into two halves . I have done this several times and quite easy if there is a logical key (like date ranges etc) that are spread out uniformly.

There is a Lucene index splitting tool . I have not used this myself though.

Upvotes: 1

Related Questions