Annotation Type Field


  • @Documented
    @Inherited
    @Retention(RUNTIME)
    @Target(ANNOTATION_TYPE)
    public @interface Field
    Define a field to be used in an index;
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      dev.morphia.utils.IndexType type  
      int weight  
    • Element Detail

      • value

        java.lang.String value
        Returns:
        Field name to index
      • type

        dev.morphia.utils.IndexType type
        Returns:
        "Direction" of the indexing. Defaults to IndexType.ASC.
        See Also:
        IndexType
        Default:
        dev.morphia.utils.IndexType.ASC
      • weight

        int weight
        Returns:
        The weight to use when creating a text index. This value only makes sense when direction is IndexType.TEXT
        Default:
        -1