Namespace Lucene.Net.Documents
The logical representation of a Document for indexing and searching.
The document package provides the user level logical representation of content to be indexed and searched. The package also provides utilities for working with Documents and <xref:Lucene.Net.Index.IndexableField>s.
Document and IndexableField
A Document is a collection of <xref:Lucene.Net.Index.IndexableField>s. A <xref:Lucene.Net.Index.IndexableField> is a logical representation of a user's content that needs to be indexed or stored. <xref:Lucene.Net.Index.IndexableField>s have a number of properties that tell Lucene how to treat the content (like indexed, tokenized, stored, etc.) See the Field implementation of <xref:Lucene.Net.Index.IndexableField> for specifics on these properties.
Note: it is common to refer to Documents having Fields, even though technically they have <xref:Lucene.Net.Index.IndexableField>s.
Working with Documents
First and foremost, a Document is something created by the user application. It is your job to create Documents based on the content of the files you are working with in your application (Word, txt, PDF, Excel or any other format.) How this is done is completely up to you. That being said, there are many tools available in other projects that can make the process of taking a file and converting it into a Lucene Document.
The DateTools is a utility class to make dates and times searchable (remember, Lucene only searches text). <xref:Lucene.Net.Documents.IntField>, <xref:Lucene.Net.Documents.LongField>, <xref:Lucene.Net.Documents.FloatField> and DoubleField are a special helper class to simplify indexing of numeric values (and also dates) for fast range range queries with NumericRangeQuery (using a special sortable string representation of numeric values).
Classes
DocumentExtensions
LUCENENET specific extensions to the Document class.