Annotation Type Field
-
@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Field
Annotation that specifies that the value returned by the annotated value should be indexed and/or stored by SOLR, when encountered in the root document. This annotation is inherited and can be overridden.- See Also:
ReferField
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<? extends FieldAdapter<?>>
adapter
Class of an object implementing the FieldAdapter interface, which allows for changing the value annotated before it is indexed/stored.boolean
body
Returns whether this value should be included in the body.double
boost
Specifies the exact importance of this value, relative to the other fields used in a query.boolean
facet
Returns whether this value should be treated as a facet (i.e.boolean
heading
Returns whether this value should be included in the heading.String
identifiers
Specifies a comma separated list of identifiers with which the annotated method can be invoked.boolean
indexed
Returns whether this value should be indexed (i.e.boolean
stored
Returns whether this value should be stored (i.e.
-
-
-
Element Detail
-
stored
boolean stored
Returns whether this value should be stored (i.e. is retrievable and usable in the advanced search). The default value is true. Even if this method returns true, an adapter may override this by returning null when adapting.- Returns:
- true or false
- See Also:
indexed()
,FieldAdapter.adapt(Object, Locale)
- Default:
- true
-
-
-
indexed
boolean indexed
Returns whether this value should be indexed (i.e. a search will consult this field's value(s)). The default value is false. Even if this method returns true, an adapter may override this by returning null when adapting. Iffacet()
is true, orboost()
!= 0, this settings is overridden to true.- Returns:
- true or false
- See Also:
stored()
,FieldAdapter.adapt(Object, Locale)
- Default:
- false
-
-
-
facet
boolean facet
Returns whether this value should be treated as a facet (i.e. appear in Advanced Search facets). The default value is false. If not true,indexed()
is effectively true.- Returns:
- true or false
- Default:
- false
-
-
-
body
boolean body
Returns whether this value should be included in the body. If this flag is true, this value will be one of the values a document can be found by. A match on this value will cause documents to appear lower in the search results, compared to when usingheading()
. The default value is false. This flag can be used together withheading()
.- Returns:
- true or false
- See Also:
heading()
- Default:
- false
-
-
-
heading
boolean heading
Returns whether this value should be included in the heading. If this flag is true, this value will be one of the values a document can be found by. A match on this value will cause documents to appear higher in the search results, compared to when usingbody()
. The default value is false. This flag can be used together withbody()
.- Returns:
- true or false
- See Also:
body()
- Default:
- false
-
-
-
boost
double boost
Specifies the exact importance of this value, relative to the other fields used in a query. Any value higher than 1.0, means this value is deemed more significant, and any lower value means the value is less important. The boost value can be used together withheading()
, in which case the resulting significance is a combination of both. A negative boost value means that if the field matches a search query, it will lower the documents' score. The boost value is ignored if the field is not indexed, or if it is 0. By default, no explicit boost value is used and there will be no effect at all when searching. If boost is not 0,indexed()
will be effectively true.- Returns:
- the boost factor
- See Also:
heading()
- Default:
- 0.0
-
-
-
identifiers
String identifiers
Specifies a comma separated list of identifiers with which the annotated method can be invoked. This annotation can be used i.e. in dynamically / runtime generated classes which can have changing property fields. These identifiers can be used as parameter to the annotated method, to get the string representation of the property.- Returns:
- The comma separated list of strings identifying the properties for the annotated method
- Default:
- ""
-
-
-
adapter
Class<? extends FieldAdapter<?>> adapter
Class of an object implementing the FieldAdapter interface, which allows for changing the value annotated before it is indexed/stored. Adapters may be language specific. Defaults to a no-op adapter. The implementing class should have a zero args constructor. If the same adapter is used multiple times, as single instance can (and will) be used for multiple values.- Returns:
- the class of the adapter to use
- Default:
- nl.gx.webmanager.services.contentindex.adapter.FieldAdapter.Identity.class
-
-