Created: 2011-07-13 20:23
Updated: 2013-10-05 07:19


#Solr Test document generator

This PHP script helps to generate an arbitrary random text documents which can be used to test a Solr instance.

I created it for my own purposes. Changes will most likely be necessary.

##Ho it works

Pretty simplistic. Sentences are generated by randomly picking words from a dictionary (which is not included.) Every now and then, a short word like "as", "for", "in" etc. is inserted to make it look more natural.


One XML file per document, which can be submitted to a Solr update request handler.

See for an example.


Needs PHP. Best is to run the scipt on the command line.

##Where to get a Dictionary

Here, for example:


Generation of documents is pretty slow. On my machine, creating 100 documents takes 4 minutes to create.


Public Domain

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more