| org.compass.annotations.SearchableId
SearchableId | public @interface SearchableId(Code) | | Specifies a searchable id on property or field of the
Searchable class.
Each searchable class must have at least one id annotation. The type
of the field/property can be a simple type, or a custom class. In case
of a custom class, there should be a specialized converter associtaed
with it, with the preferable way of defining the converter is to use
the
SearchableClassConverter annotating the custom class.
A searchable class can have more than one searchable id associated with it.
For simple usage, the annotation can create a
SearchableMetaData automatically
(without explicitly defining one on the field/property).
It will only be created if the
SearchableId.name() is set to a value. Most of
the attributes that can control the meta-data are provided in the searchable
id as well, they are marked in the java doc.
Note, that if the
SearchableId.name() is not set, no defined
SearchableMetaData will be created, and Compass will end up generating an internal meta-data for it.
For additional meta-datas, use the
SearchableMetaData or
SearchableMetaDatas .
Compass might require an internal meta-data to be created, so it can identify the correct
value that match the property/field. Controlling the creation and specifics of the intenal
meta-data id can be done using
SearchableId.managedId() and
SearchableId.managedIdIndex() .
author: kimchy See Also: Searchable See Also: SearchableClassConverter See Also: SearchableMetaData See Also: SearchableMetaDatas |
accessor | String accessor(Code) | | The property accessor that will be fetch and write the property value.
It is automatically set based on where the annotation is used, but can be
explicitly set. Compass also supports custom property accessors, registered
under a custom name, which can then be used here as well.
|
managedId | ManagedId managedId(Code) | | Controls if the internal meta-data id creation.
|
managedIdIndex | ManagedIdIndex managedIdIndex(Code) | | If the internal meta-data id is created, controls it's
index parameter.
|
override | boolean override(Code) | | If there is already an existing id with the same field/property name defined,
will override it.
|
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.
|
|
|