Package org.apache.solr.bench
Class Docs
- java.lang.Object
-
- org.apache.solr.bench.Docs
-
public class Docs extends Object
A tool to generate controlled random data for a benchmark.SolrInputDocument
s are created based on supplied FieldDef definitions.You can call getDocument to build and retrieve one
SolrInputDocument
at a time, or you can callpreGenerate(int)
to generate the given number of documents in RAM, and then retrieve them viageneratedDocsIterator()
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear.static Docs
docs()
Docs docs.static Docs
docs(Long seed)
Docs docs.org.apache.solr.common.SolrDocument
document()
Document solr document.Docs
field(String name, org.quicktheories.core.Gen<?> generator)
Field docs.Docs
field(SolrGen<?> generator)
Field docs.Iterator<org.apache.solr.common.SolrInputDocument>
generatedDocsIterator()
Generated docs iterator iterator.org.apache.solr.common.SolrInputDocument
inputDocument()
Input document solr input document.Iterator<org.apache.solr.common.SolrInputDocument>
preGenerate(int numDocs)
Pre generate iterator.
-
-
-
Method Detail
-
docs
public static Docs docs()
Docs docs.- Returns:
- the docs
-
preGenerate
public Iterator<org.apache.solr.common.SolrInputDocument> preGenerate(int numDocs) throws InterruptedException
Pre generate iterator.- Parameters:
numDocs
- the num docs- Returns:
- the iterator
- Throws:
InterruptedException
- the interrupted exception
-
generatedDocsIterator
public Iterator<org.apache.solr.common.SolrInputDocument> generatedDocsIterator()
Generated docs iterator iterator.- Returns:
- the iterator
-
inputDocument
public org.apache.solr.common.SolrInputDocument inputDocument()
Input document solr input document.- Returns:
- the solr input document
-
document
public org.apache.solr.common.SolrDocument document()
Document solr document.- Returns:
- the solr document
-
field
public Docs field(String name, org.quicktheories.core.Gen<?> generator)
Field docs.- Parameters:
name
- the namegenerator
- the generator- Returns:
- the docs
-
field
public Docs field(SolrGen<?> generator)
Field docs.- Parameters:
generator
- the generator- Returns:
- the docs
-
clear
public void clear()
Clear.
-
-