Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4178

FieldType.setTokenized shoudl be true by default

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0-ALPHA
    • 4.0-BETA, 6.0
    • None
    • None
    • New

    Description

      This is really confusing, see LUCENE-4176 where a user hit this.

      The example code from the user there reads:

      FieldType fieldType = new FieldType();
      fieldType.setIndexed(true);
      fieldType.setStored(true);
      

      Its really trappy that this does not invoke the analyzer: because historically we did this unless you specified NOT_ANALYZED.

      So i think fieldType.setTokenized(true) should be the default: things like StringField can turn it off.

      Attachments

        1. LUCENE-4178.patch
          2 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: