|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={TYPE,METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface SearchableMetaData
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 converter(). The
specialized converter will implement the Converter
interface, usually extending the 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 Collection type field/property,
supporting either List or 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.
| Required Element Summary | |
|---|---|
String |
name
The name of the meta-data. |
| Optional Element 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. |
boolean |
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. |
Reverse |
reverse
Specifies whether and how the meta-data proeprty should value will be revered. |
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. |
| Element Detail |
|---|
public abstract String name
public abstract float boost
public abstract Store store
public abstract Index index
public abstract TermVector termVector
public abstract Reverse reverse
public abstract String analyzer
public abstract boolean excludeFromAll
Searchable.enableAll()public abstract String converter
public abstract String format
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||