|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.benchmark.byTask.feeds.DocMaker
public class DocMaker
Creates Document
objects. Uses a ContentSource
to generate
DocData
objects. Supports the following parameters:
ContentSource
class to use
(default SingleDocSource).
doc.tokenized.norms
is set to false, to allow norms storing just
for the body field. (default true).
DocData.getProps()
will be indexed. (default false).
Field Summary | |
---|---|
static String |
BODY_FIELD
|
protected Field.Index |
bodyIndexVal
|
protected Field.Store |
bodyStoreVal
|
static String |
BYTES_FIELD
|
protected Config |
config
|
static String |
DATE_FIELD
|
static String |
DATE_MSEC_FIELD
|
static String |
ID_FIELD
|
protected boolean |
indexProperties
|
protected Field.Index |
indexVal
|
static String |
NAME_FIELD
|
protected boolean |
reuseFields
|
protected ContentSource |
source
|
protected Field.Store |
storeVal
|
protected Field.TermVector |
termVecVal
|
static String |
TIME_SEC_FIELD
|
static String |
TITLE_FIELD
|
Constructor Summary | |
---|---|
DocMaker()
|
Method Summary | |
---|---|
void |
close()
Closes the DocMaker . |
long |
getBytesCount()
Returns the number of bytes generated by the content source since last reset. |
protected org.apache.lucene.benchmark.byTask.feeds.DocMaker.DocState |
getDocState()
|
long |
getTotalBytesCount()
Returns the total number of bytes that were generated by the content source defined to that doc maker. |
Document |
makeDocument()
Creates a Document object ready for indexing. |
Document |
makeDocument(int size)
Same as makeDocument() , only this method creates a document of the
given size input by size . |
void |
resetInputs()
Reset inputs so that the test run would behave, input wise, as if it just started. |
void |
setConfig(Config config)
Set the configuration parameters of this doc maker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String BODY_FIELD
public static final String TITLE_FIELD
public static final String DATE_FIELD
public static final String DATE_MSEC_FIELD
public static final String TIME_SEC_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.Store bodyStoreVal
protected Field.Index indexVal
protected Field.Index bodyIndexVal
protected Field.TermVector termVecVal
protected ContentSource source
protected boolean reuseFields
protected boolean indexProperties
Constructor Detail |
---|
public DocMaker()
Method Detail |
---|
protected org.apache.lucene.benchmark.byTask.feeds.DocMaker.DocState getDocState()
public void close() throws IOException
DocMaker
. The base implementation closes the
ContentSource
, and it can be overridden to do more work (but make
sure to call super.close()).
close
in interface Closeable
IOException
public long getBytesCount()
public long getTotalBytesCount()
public Document makeDocument() throws Exception
Document
object ready for indexing. This method uses the
ContentSource
to get the next document from the source, and creates
a Document
object from the returned fields. If
reuseFields
was set to true, it will reuse Document
and Field
instances.
Exception
public Document makeDocument(int size) throws Exception
makeDocument()
, only this method creates a document of the
given size input by size
.
Exception
public void resetInputs() throws IOException
IOException
public void setConfig(Config config)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |