php-solr-testdoc-generator

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

README.markdown

#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.

##Output

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

See https://raw.github.com/marians/php-solr-testdoc-generator/master/testdocs/0.xml for an example.

##Requirements

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

##Where to get a Dictionary

Here, for example:

http://www.karamasoft.com/UltimateSpell/Dictionary/English%20(United%20States)/en-US.zip

##Performance

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

##License:

Public Domain

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