concept each document in category lucene

appears as: each document
Lucene in Action, Second Edition

This is an excerpt from Manning's book Lucene in Action, Second Edition.

Once you’ve worked out this design, you’ll need to extract text from the original raw content for each document. If your content is already textual in nature, with a known standard encoding, your job is simple. But more often these days documents are binary in nature (PDF, Microsoft Office, Open Office, Adobe Flash, streaming video and audio multimedia files) or contain substantial markups that you must remove before indexing (RDF, XML, HTML). You’ll need to run document filters to extract text from such content before creating the search engine document.

Table C.1. General settings

Name Default value

Description

work.dir
System property
benchmark.work.dir or work.
Specifies the root directory for data and indexes.
analyzer
StandardAnalyzer
Contains the fully qualified class name to instantiate as the analyzer for indexing and parsing queries.
content.source
SingleDocSource
Specifies the class that provides the raw content.
doc.maker
DocMaker
Specifies the class used to create documents from the content provided by the content source.
content.source.forever
true
Boolean. If true, the content.source will reset itself upon running out of content and keep producing the same content forever. Otherwise, it will stop when it has made one pass through its source.
content.source.verbose
false
Specifies whether messages from the content source should be printed.
content.source.encoding
null
Specifies the character encoding of the content source.
html.parser
Not set
Contains the class name to filter HTML to text. The default is null (no HTML parsing is invoked). You can specify org.apache.lucene.benchmark.byTask.feeds.DemoHTMLP arser to use the simple HTML parser included in Lucene’s demo package.
doc.stored
false
Boolean. If true, fields added to the document by the doc.maker are created with Field.Store.YES.
doc.tokenized
true
Boolean. If true, fields added to the document by the doc.maker are created with Field.Index.ANALYZED or Field.Index.ANALYZED_NO_NORMS.
doc.tokenized.norms
false
Specifies whether non-body fields in the document should be indexed with norms.
doc.body.tokenized.norms
true
Specifies whether the body field should be indexed with norms.
doc.term.vector
false
Boolean. If true, fields are indexed with term vectors enabled.
doc.term.vector.positions
false
Boolean. If true, then term vectors positions are indexed.
doc.term.vector.offsets
false
Boolean. If true, term vector offsets are indexed.
doc.store.body.bytes
false
Boolean. If true, the document’s fields are indexed with Field.Store.YES into the field docbytes.
doc.random.id.limit
-1
Integer. If not equal to -1 the LineDocMaker tasks will randomly pick IDs within this bound. This is useful with the UpdateDoc task for testing IndexWriter’s updateDocument performance
docs.dir
Depends on document source
Contains the string directory name. Used by certain document sources as the root directory for finding document files in the file system.
docs.file
Not set
Contains the string directory name. Used by certain document sources as the root filename. Used by LineDocSource, WriteLineFile, and EnwikiContentSource as the file for singleline documents.
doc.index.props
false
If true, the properties set by the content source for each document will be indexed as separate fields. Presently only SortableSingleDocMaker and any HTML content processed by the HTML parser set properties.
doc.reuse.fields
true
Boolean. If true, a single shared instance of Document and a single shared instance of Field for each field in the document are reused. This gains performance by avoiding allocation and GC costs. But if you create a custom task that adds documents to an index using private threads, you’ll need to turn this off. The normal parallel task sequence, which also uses threads, may leave this at true because the single instance is per thread.
query.maker
SimpleQueryMaker
Contains the string class name for the source of queries. See section C.2.2 for details.
file.query.maker.file
Not set
Specifies the string path to the filename used by FileBasedQueryMaker. This is the file that contains one text query per line
file.query.maker.default.field
body
Specifies the field that FileBasedQueryMaker will issue its queries against.
doc.delete.step
8
When deleting documents in steps, this is the step that’s added in between deletions. See the DeleteDoc task for more detail.