01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.compass.annotations;
18:
19: import java.lang.annotation.ElementType;
20: import java.lang.annotation.Retention;
21: import java.lang.annotation.RetentionPolicy;
22: import java.lang.annotation.Target;
23:
24: /**
25: * For {@link Searchable} classes, allows to control the "all" meta-data
26: * definitions per searchable class.
27: *
28: * <p>The "all" meta-data is an internal meta-data, which holds
29: * searchable information of all the class searchable content.
30: *
31: * <p>The definitions here are per searchable class definitions. For global
32: * control of the "all" meta-data see {@link org.compass.core.config.CompassEnvironment.All}
33: * settings.
34: *
35: * @author kimchy
36: * @see Searchable
37: */
38: @Target(ElementType.TYPE)
39: @Retention(RetentionPolicy.RUNTIME)
40: public @interface SearchableAllMetaData {
41:
42: /**
43: * The name of the "all" meta-data that will be created.
44: * Defaults to the global setting.
45: */
46: String name() default "";
47:
48: /**
49: * Controls if the searchable class will create it's own internal "all"
50: * meta-data. The "all" meta-data holds searchable information of all
51: * the class searchable content.
52: *
53: * <p>If using the "all" meta-data, it can be controlled using the
54: * {@link SearchableAllMetaData} annotation.
55: */
56: EnableAll enable() default EnableAll.NA;
57:
58: /**
59: * The term vector for the "all" meta-data.
60: */
61: TermVector termVector() default TermVector.NO;
62:
63: /**
64: * Controls is the alias will be stored within the "all" proeprty or not.
65: */
66: ExcludeAlias excludeAlias() default ExcludeAlias.NA;
67:
68: /**
69: * Expert:
70: * If set, omit normalization factors associated with this indexed field.
71: * This effectively disables indexing boosts and length normalization for this field.
72: */
73: boolean omitNorms() default false;
74:
75: /**
76: * Should this propety be included in the spell check index.
77: *
78: * <p>Note, most times this is not requried to be configured, since by default, the
79: * spell check index uses the "all" property.
80: */
81: SpellCheck spellCheck() default SpellCheck.EXCLUDE;
82: }
|