SPT Object Database API

com.sptci.prevayler.annotations
Annotation Type Searchable


@Documented
@Inherited
@Retention(value=RUNTIME)
@Target(value={TYPE,FIELD})
public @interface Searchable

Annotation for class fields that are to be indexed for full-text search. When specified at the class level, it is possible to specify a number of fields that are to be indexed as a combination making for easier search queries.

© Copyright 2008 Sans Pareil Technologies, Inc.

Since:
Release 0.3.0
Version:
$Id: Searchable.java 22 2008-11-24 19:04:25Z sptrakesh $
Author:
Rakesh 2008-11-12

Optional Element Summary
 String[] members
          The name of the fields in the prevalent object to index.
 String name
          The name of the field within the lucene document that is represented by this index.
 

name

public abstract String name
The name of the field within the lucene document that is represented by this index. Specify only for composite indices (specified at class level. When annotated at the field level, the name of the field is taken as the indexed field name. If not specified a name that is the concatenation of the field names in members() will be used. Using the default value will make it harder to compile queries, so it is recommended that you specify this value as well.

Returns:
The name of the indexed field.
Default:
""

members

public abstract String[] members
The name of the fields in the prevalent object to index. This need only be specified when specified at the class level. Multiple fields may be specified to indicate a composite search index (tokenised and stored as a common index for easy search). Defaults to NULL.

Returns:
The name of the fields.
Default:
""

SPT Object Database API