Documentfor indexing and searching.
Document and IndexableField
Document is a collection of
IndexableField is a
logical representation of a user's content that needs to be indexed or stored.
IndexableFields have a number of properties that tell Lucene how to
treat the content (like indexed, tokenized, stored, etc.) See the
Field implementation of
IndexableField for specifics on these properties.
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
DateTools is a utility class to make dates and times
DoublePoint enable indexing of numeric values (and also dates) for
fast range queries using
Class Summary Class Description BinaryDocValuesFieldField that stores a per-document
BinaryPointAn indexed binary field for fast range filters. DateToolsProvides support for converting dates to strings and vice-versa. DocumentDocuments are the unit of indexing and search. DocumentStoredFieldVisitor DoubleDocValuesFieldSyntactic sugar for encoding doubles as NumericDocValues via
doublefield for fast range filters.
DoubleRangeAn indexed Double Range field. DoubleRangeDocValuesFieldDocValues field for DoubleRange. FeatureField
Fieldthat can be used to store static scoring factors into documents.
FieldExpert: directly create a field for a document. FieldTypeDescribes the properties of a field. FloatDocValuesFieldSyntactic sugar for encoding floats as NumericDocValues via
floatfield for fast range filters.
FloatRangeAn indexed Float Range field. FloatRangeDocValuesFieldDocValues field for FloatRange. InetAddressPointAn indexed 128-bit
InetAddressRangeAn indexed InetAddress Range Field IntPointAn indexed
intfield for fast range filters.
IntRangeAn indexed Integer Range field. IntRangeDocValuesFieldDocValues field for IntRange. KnnVectorFieldA field that contains a single floating-point numeric vector (or none) for each document. LatLonDocValuesFieldAn per-document location field. LatLonPointAn indexed location field. LatLonShapeAn geo shape utility class for indexing and searching gis geometries whose vertices are latitude, longitude values (in decimal degrees). LongPointAn indexed
longfield for fast range filters.
LongRangeAn indexed Long Range field. LongRangeDocValuesFieldDocValues field for LongRange. NumericDocValuesFieldField that stores a per-document
longvalue for scoring, sorting or value retrieval.
RangeFieldQueryQuery class for searching
RangeFieldtypes by a defined
ShapeFieldA base shape utility class used for both LatLon (spherical) and XY (cartesian) shape fields. ShapeField.DecodedTriangleRepresents a encoded triangle using
ShapeField.Trianglepolygons are decomposed into tessellated triangles using
Tessellatorthese triangles are encoded and inserted as separate indexed POINT fields
SortedDocValuesFieldField that stores a per-document
BytesRefvalue, indexed for sorting.
SortedNumericDocValuesFieldField that stores a per-document
longvalues for scoring, sorting or value retrieval.
SortedSetDocValuesFieldField that stores a set of per-document
BytesRefvalues, indexed for faceting,grouping,joining.
StoredField StringFieldA field that is indexed but not tokenized: the entire String value is indexed as a single token. TextFieldA field that is indexed and tokenized, without term vectors. XYDocValuesFieldAn per-document location field. XYDocValuesPointInGeometryQueryXYGeometry query for
XYPointFieldAn indexed XY position field. XYShapeA cartesian shape utility class for indexing and searching geometries whose vertices are unitless x, y values.
Enum Summary Enum Description DateTools.ResolutionSpecifies the time granularity. Field.StoreSpecifies whether and how a field should be stored. RangeFieldQuery.QueryTypeUsed by
RangeFieldQueryto check how each internal or leaf node relates to the query.
ShapeField.DecodedTriangle.TYPEtype of triangle ShapeField.QueryRelationQuery Relation Types *