Class TextField

  • All Implemented Interfaces:
    IndexableField

    public final class TextField
    extends Field
    A field that is indexed and tokenized, without term vectors. For example this would be used on a 'body' field, that contains the bulk of a document's text.
    • Field Detail

      • TYPE_NOT_STORED

        public static final FieldType TYPE_NOT_STORED
        Indexed, tokenized, not stored.
      • TYPE_STORED

        public static final FieldType TYPE_STORED
        Indexed, tokenized, stored.
    • Constructor Detail

      • TextField

        public TextField​(String name,
                         String value,
                         Field.Store store)
        Creates a new TextField with String value.
        Parameters:
        name - field name
        value - string value
        store - Store.YES if the content should also be stored
        Throws:
        IllegalArgumentException - if the field name or value is null.