|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.benchmark.byTask.feeds.BasicDocMaker
public abstract class BasicDocMaker
Create documents for the test. Maintains counters of chars etc. so that sub-classes just need to provide textual content, and the create-by-size is handled here.
Config Params (default is in caps): doc.stored=true|FALSE
Field Summary | |
---|---|
static String |
BODY_FIELD
|
static String |
BYTES_FIELD
|
protected Config |
config
|
static String |
DATE_FIELD
|
protected boolean |
forever
|
static String |
ID_FIELD
|
protected Field.Index |
indexVal
|
static String |
NAME_FIELD
|
protected Field.Store |
storeVal
|
protected Field.TermVector |
termVecVal
|
static String |
TITLE_FIELD
|
Constructor Summary | |
---|---|
BasicDocMaker()
|
Method Summary | |
---|---|
protected void |
addBytes(long n)
|
protected void |
addUniqueBytes(long n)
|
protected void |
collectFiles(File f,
ArrayList inputFiles)
|
long |
getByteCount()
Return total byte size of docs made since last reset. |
int |
getCount()
Return number of docs made since last reset. |
HTMLParser |
getHtmlParser()
Returns the htmlParser. |
protected abstract DocData |
getNextDocData()
Return the data of the next document. |
Document |
makeDocument()
Create the next document. |
Document |
makeDocument(int size)
Create the next document, of the given size by input bytes. |
long |
numUniqueBytes()
Return total bytes of all available unique texts, 0 if not applicable |
void |
printDocStatistics()
Print some statistics on docs available/added/etc. |
void |
resetInputs()
Reset inputs so that the test run would behave, input wise, as if it just started. |
protected void |
resetUniqueBytes()
|
void |
setConfig(Config config)
Set the properties |
void |
setHTMLParser(HTMLParser htmlParser)
Set the html parser to use, when appropriate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.lucene.benchmark.byTask.feeds.DocMaker |
---|
numUniqueTexts |
Field Detail |
---|
protected boolean forever
public static final String BODY_FIELD
public static final String TITLE_FIELD
public static final String DATE_FIELD
public static final String ID_FIELD
public static final String BYTES_FIELD
public static final String NAME_FIELD
protected Config config
protected Field.Store storeVal
protected Field.Index indexVal
protected Field.TermVector termVecVal
Constructor Detail |
---|
public BasicDocMaker()
Method Detail |
---|
protected abstract DocData getNextDocData() throws NoMoreDataException, Exception
if
- cannot create the next doc data
NoMoreDataException
- if data is exhausted (and 'forever' set to false).
Exception
public Document makeDocument() throws Exception
DocMaker
makeDocument
in interface DocMaker
Exception
public Document makeDocument(int size) throws Exception
DocMaker
makeDocument
in interface DocMaker
size
- size of document, or 0 if there is no size requirement.
Exception
public void setConfig(Config config)
DocMaker
setConfig
in interface DocMaker
public void resetInputs()
DocMaker
resetInputs
in interface DocMaker
public long numUniqueBytes()
DocMaker
numUniqueBytes
in interface DocMaker
public int getCount()
DocMaker
getCount
in interface DocMaker
public long getByteCount()
DocMaker
getByteCount
in interface DocMaker
protected void addUniqueBytes(long n)
protected void resetUniqueBytes()
protected void addBytes(long n)
public void printDocStatistics()
DocMaker
printDocStatistics
in interface DocMaker
protected void collectFiles(File f, ArrayList inputFiles)
public void setHTMLParser(HTMLParser htmlParser)
DocMaker
setHTMLParser
in interface DocMaker
public HTMLParser getHtmlParser()
DocMaker
getHtmlParser
in interface DocMaker
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |