Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • This annotation is inherited and may be overridden.
  • Use @Document to annotate methods that should be taken into account of if the owner class itself is indexed, and @ReferDocument for when the declaring class will be part of the indexed document.
  • They have the following parameters:
    • inheritLanguage=false - If this is set to true, the language of the target document will be set/overridden to the language of the current document. This may either be the language explicitly defined for the object declaring the annotation or the language inherited from a parent document. This setting is useful if referred documents should be indexed with the same language as the root document. For example, elements on pages.
    • adapter=null - A DocumentAdapter that changes the object whose class will be scanned for indexable properties.
      • An adapter may be
        • a concrete class, in which case it should have a zero-arguments constructor;
        • an interface of which an implementation is exposed via OSGi (whiteboard pattern).
      • An adapter may decide to adapt a value to nothing (that is, return null), causing no value to be scanned. This is also what happens if an adapt method terminates exceptionally, although in this case a warning is logged as well.
      • If an annotated method returns null, this value is given to the adapter anyway in order to give it the chance to make something out of it.

...