Annotation Type ReferField


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    public @interface ReferField
    Annotation that specifies that the value returned by the annotated value should be indexed and/or stored by SOLR, when containing document is included by an other document, by means of @Document or @ReferDocument. This annotation is inherited and can be overridden.
    See Also:
    Field
    • 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.
      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. If facet() is true, or boost() != 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 using heading(). The default value is false. This flag can be used together with heading().
        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 using body(). The default value is false. This flag can be used together with body().
        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 with heading(), 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
      • 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