001package com.avaje.ebean.annotation;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Retention;
005import java.lang.annotation.RetentionPolicy;
006import java.lang.annotation.Target;
007
008/**
009 * Used to indicate that a particular string property should be treated as a 'code' and not analysed for text searching.
010 * <p>
011 * By default all Id properties and all Enum properties are treated as 'code' and not analysed.
012 * </p>
013 */
014@Target({ElementType.FIELD})
015@Retention(RetentionPolicy.RUNTIME)
016public @interface DocCode {
017
018  /**
019   * Set to true to have the property additionally stored separately from _source.
020   */
021  boolean store() default false;
022
023  /**
024   * Set a boost value specific to this property.
025   */
026  float boost() default 1;
027
028  /**
029   * Set a value to use instead of null.
030   */
031  String nullValue() default "";
032}