org.compass.annotations
Annotation Type SearchableConstant


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface SearchableConstant

A constant meta-data that can be defined on a Searchable class.

A constant meta-data is a predefined name and value pair that will be saved in the search engine index.

Multiple constants can be defined using the SearchableConstants annotation.

Author:
kimchy
See Also:
Searchable, SearchableConstants

Required Element Summary
 String name
          The name of the meta-data.
 String[] values
          A list of values that the meta-data will have.
 
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
          Converter for the Constant meta-data mapping.
 ExcludeFromAll excludeFromAll
          Specifies if this meta-data should be excluded from the generated "all" meta-data.
 Index index
          Specifies whether and how a meta-data proeprty should be indexed.
 OmitNorms omitNorms
          Expert: If set, omit normalization factors associated with this indexed field.
 boolean override
          Controls if the constant value should override the same constant defined elsewhere for the same searchable class.
 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.
 

Element Detail

name

public abstract String name
The name of the meta-data.


values

public abstract String[] values
A list of values that the meta-data will have.

boost

public abstract float boost
The boost level for the meta-data. Will cause hits based on this meta-data to rank higher.

Default:
1.0f

store

public abstract Store store
Specifies whether and how a meta-data property will be stored.

Default:
NA

index

public abstract Index index
Specifies whether and how a meta-data proeprty should be indexed.

Default:
NA

termVector

public abstract TermVector termVector
Specifies whether and how a meta-data property should have term vectors.

Default:
NA

omitNorms

public abstract OmitNorms omitNorms
Expert: If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field.

Default:
NA

analyzer

public abstract String analyzer
Specifies a specialized analyzer lookup name that will be used to analyze the meta-data content.

Defaults to Compass default analyzer.

Default:
""

excludeFromAll

public abstract ExcludeFromAll excludeFromAll
Specifies if this meta-data should be excluded from the generated "all" meta-data.

See Also:
SearchableAllMetaData.enable()
Default:
NO

override

public abstract boolean override
Controls if the constant value should override the same constant defined elsewhere for the same searchable class.

Default:
true

spellCheck

public abstract SpellCheck spellCheck
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.

Default:
EXCLUDE

converter

public abstract String converter
Converter for the Constant meta-data mapping.

Default:
""


Copyright (c) 2004-2008 The Compass Project.