| org.compass.annotations.SearchableMetaData
SearchableMetaData | public @interface SearchableMetaData(Code) | | Sepcifies additional meta-data on a
SearchableProperty or
SearchableId .
SearchableId and
SearchableProperty can be used to
auto-generate meta-data. If more than one meta-data is required, the
SearchableMetaData /
SearchableMetaDatas can be used.
The searchable meta-data is meant to handle basic types (which usually translate to
a String saved in the search engine). The conversion is done using converters, with
Compass providing converters for most basic types. A specialized Converter can be
associated with the auto generated meta-data using
SearchableMetaData.converter() . The
specialized converter will implement the
org.compass.core.converter.Converter interface, usually extending the
org.compass.core.converter.basic.AbstractBasicConverter .
Another way of defining a converter for a class can be done using the
SearchableClassConverter to annotate the class that needs conversion, with Compass auto detecting it.
Note, that most of the time, a specialized converter for user classes will not be needed,
since the
SearchableComponent usually makes more sense to use.
The searchalbe property can annotate a
java.util.Collection type field/property,
supporting either
java.util.List or
java.util.Set . The searchable property
will try and automatically identify the element type using generics, but if the collection
is not defined with generics,
SearchableProperty.type should be used to hint for
the collection element type.
The searchable property can annotate an array as well, with the array element type used for
Converter lookups.
author: kimchy |
Field Summary | |
String | analyzer Specifies a specialized analyzer lookup name that will be used to analyze
the meta-data content. | float | boost The boost level for the meta-data. | String | converter The converter lookup name for the given meta-data. | ExcludeFromAll | excludeFromAll Specifies if this meta-data should be excluded from the generated
"all" meta-data. | String | format The format to apply to the value. | Index | index Specifies whether and how a meta-data proeprty should be indexed. | String | name The name of the meta-data. | String | nullValue A null value to use to store in the index when the property has a null
value. | boolean | omitNorms Expert:
If set, omit normalization factors associated with this indexed field. | Reverse | reverse Specifies whether and how the meta-data proeprty should value will be revered. | SpellCheck | spellCheck Should this propety be included in the spell check index. | Store | store Specifies whether and how a meta-data property will be stored. | TermVector | termVector Specifies whether and how a meta-data property should have term vectors. |
analyzer | String analyzer(Code) | | Specifies a specialized analyzer lookup name that will be used to analyze
the meta-data content.
Defaults to Compass default analyzer.
|
boost | float boost(Code) | | The boost level for the meta-data. Will cause hits
based on this meta-data to rank higher.
|
converter | String converter(Code) | | The converter lookup name for the given meta-data.
Defaults to one of Compass internal converters.
|
format | String format(Code) | | The format to apply to the value. Only applies to format-able converters
(like dates and numbers).
|
index | Index index(Code) | | Specifies whether and how a meta-data proeprty should be indexed.
|
name | String name(Code) | | The name of the meta-data. The name will be the value the contend will
be saved under, so it can later be searched using "author:london" (here
the name is author).
|
nullValue | String nullValue(Code) | | A null value to use to store in the index when the property has a null
value. Defaults to not storing null values if the globabl setting of
compass.mapping.nullvalue is not set. If it set, disabling the null
value can be done by setting it to
org.compass.core.config.CompassEnvironment.NullValue.DISABLE_NULL_VALUE_FOR_MAPPING value ($disable$ ).
|
omitNorms | boolean omitNorms(Code) | | Expert:
If set, omit normalization factors associated with this indexed field.
This effectively disables indexing boosts and length normalization for this field.
|
reverse | Reverse reverse(Code) | | Specifies whether and how the meta-data proeprty should value will be revered.
|
spellCheck | SpellCheck spellCheck(Code) | | Should this propety be included in the spell check index.
Note, most times this is not requried to be configured, since by default, the
spell check index uses the "all" property.
|
store | Store store(Code) | | Specifies whether and how a meta-data property will be stored.
|
termVector | TermVector termVector(Code) | | Specifies whether and how a meta-data property should have term vectors.
|
|
|