Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-6211

TrieDateField doesn't default to omitNorms=true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.9
    • 4.10, 6.0
    • None
    • None

    Description

      In SOLR-3140, omitNorms=true was made the default for all primitive fields. But this is not the case for TrieDateField - if the fieldType config for a TrieDateField has no omitNorms set, the fields will have norms.

      It definitely looks like it was intended for TrieDateField to default to omitNorms=true, because in the example schema.xml, omitNorms=true was removed from tdate.

      I think TrieDateField.init() just needs to call super.init() to fix this. Right now it is initializing its wrapped field, but not itself.

      There were some changes around this in trunk in SOLR-5936, but I haven't tested to see if it's fixed there. It might have covered this bug up even further, as there is now a test in PrimitiveFieldTypeTest for this, but it uses the overridden TrieDateField.hasProperty() method, which is not the way that SchemaField actually accesses the field type properties.

      Attachments

        1. SOLR-6211-branch_4x.patch
          4 kB
          Steven Rowe
        2. SOLR-6211-trunk.patch
          2 kB
          Steven Rowe

        Issue Links

          Activity

            People

              sarowe Steven Rowe
              michaelryan Michael Ryan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: