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

Field class should not let you analyze int values?

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • New

    Description

      I stumbled on this by accident, by creating a Field instance with a Integer value for its fieldsData and then setting tokenized = true in its FieldType.

      If you do this then Lucene silently converts the int to a string and then tokenizes it, e.g. applying synonyms, etc., if that's what your analysis chain does.

      Attachments

        1. LUCENE-8108.patch
          2 kB
          Michael McCandless

        Activity

          People

            Unassigned Unassigned
            mikemccand Michael McCandless
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: