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.
 boolean 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.
 boolean override
          Controls if the constant value should override the same constant defined elsewhere for the same searchable class.
 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:
YES

index

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

Default:
TOKENIZED

termVector

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

Default:
NO

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 boolean excludeFromAll
Specifies if this meta-data should be excluded from the generated "all" meta-data.

See Also:
Searchable.enableAll()
Default:
false

override

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

Default:
true

converter

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

Default:
""


Copyright (c) 2004-2006 The Compass Project.