Enum Field.Index

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Field.Index>
    Enclosing class:
    Field

    @Deprecated
    public static enum Field.Index
    extends java.lang.Enum<Field.Index>
    Deprecated.
    This is here only to ease transition from the pre-4.0 APIs.
    Specifies whether and how a field should be indexed.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ANALYZED
      Deprecated.
      Index the tokens produced by running the field's value through an Analyzer.
      ANALYZED_NO_NORMS
      Deprecated.
      Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms.
      NO
      Deprecated.
      Do not index the field value.
      NOT_ANALYZED
      Deprecated.
      Index the field's value without using an Analyzer, so it can be searched.
      NOT_ANALYZED_NO_NORMS
      Deprecated.
      Expert: Index the field's value without an Analyzer, and also disable the indexing of norms.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract boolean isAnalyzed()
      Deprecated.
       
      abstract boolean isIndexed()
      Deprecated.
       
      abstract boolean omitNorms()
      Deprecated.
       
      static Field.Index toIndex​(boolean indexed, boolean analyzed)
      Deprecated.
      Get the best representation of the index given the flags.
      static Field.Index toIndex​(boolean indexed, boolean analyzed, boolean omitNorms)
      Deprecated.
      Expert: Get the best representation of the index given the flags.
      static Field.Index valueOf​(java.lang.String name)
      Deprecated.
      Returns the enum constant of this type with the specified name.
      static Field.Index[] values()
      Deprecated.
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NO

        public static final Field.Index NO
        Deprecated.
        Do not index the field value. This field can thus not be searched, but one can still access its contents provided it is stored.
      • ANALYZED

        public static final Field.Index ANALYZED
        Deprecated.
        Index the tokens produced by running the field's value through an Analyzer. This is useful for common text.
      • NOT_ANALYZED

        public static final Field.Index NOT_ANALYZED
        Deprecated.
        Index the field's value without using an Analyzer, so it can be searched. As no analyzer is used the value will be stored as a single term. This is useful for unique Ids like product numbers.
      • NOT_ANALYZED_NO_NORMS

        public static final Field.Index NOT_ANALYZED_NO_NORMS
        Deprecated.
        Expert: Index the field's value without an Analyzer, and also disable the indexing of norms. Note that you can also separately enable/disable norms by calling FieldType.setOmitNorms(boolean). No norms means that index-time field and document boosting and field length normalization are disabled. The benefit is less memory usage as norms take up one byte of RAM per indexed field for every document in the index, during searching. Note that once you index a given field with norms enabled, disabling norms will have no effect. In other words, for this to have the above described effect on a field, all instances of that field must be indexed with NOT_ANALYZED_NO_NORMS from the beginning.
      • ANALYZED_NO_NORMS

        public static final Field.Index ANALYZED_NO_NORMS
        Deprecated.
        Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms. See NOT_ANALYZED_NO_NORMS for what norms are and why you may want to disable them.
    • Method Detail

      • values

        public static Field.Index[] values()
        Deprecated.
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Field.Index c : Field.Index.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Field.Index valueOf​(java.lang.String name)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toIndex

        public static Field.Index toIndex​(boolean indexed,
                                          boolean analyzed)
        Deprecated.
        Get the best representation of the index given the flags.
      • toIndex

        public static Field.Index toIndex​(boolean indexed,
                                          boolean analyzed,
                                          boolean omitNorms)
        Deprecated.
        Expert: Get the best representation of the index given the flags.
      • isIndexed

        public abstract boolean isIndexed()
        Deprecated.
      • isAnalyzed

        public abstract boolean isAnalyzed()
        Deprecated.
      • omitNorms

        public abstract boolean omitNorms()
        Deprecated.