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

Solr example schemas inaccurate comments on docValues and StrField

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 6.6, 7.0
    • 7.1, 8.0
    • examples
    • None

    Description

      Several of the example managed-schema files have an outdated comment about docValues and StrField. In Solr 6.6.0 these are under solr-6.6.0/solr/server and the lines where the comment starts for each file are:
      solr/configsets/basic_configs/conf/managed-schema:216:
      solr/configsets/data_driven_schema_configs/conf/managed-schema:221:
      solr/configsets/sample_techproducts_configs/conf/managed-schema:317

      In the case of Solr-6.6.0/server/solr/configsets/basic_configs/conf/managed-schema, shortly after the comment are some lines which seem to directly contradict the comment:

      216 <!-- The StrField type is not analyzed, but indexed/stored verbatim.
      217 It supports doc values but in that case the field needs to be
      218 single-valued and either required or have a default value.
      219 -->

      On line 221 a StrField is declared with docValues that is multiValued:
      221 <fieldType name="strings" class="solr.StrField" sortMissingLast="true" multiValued="true" docValues="true" />

      Also note that the comments above say that the field must either be required or have a default value, but line 221 appears to satisfy neither condition.

      The JavaDocs indicate that StrField can be multi-valued https://lucene.apache.org/core/6_6_0//core/org/apache/lucene/index/DocValuesType.html

      Attachments

        1. SOLR-11306.patch
          7 kB
          Jason Gerlowski

        Activity

          People

            varun Varun Thacker
            tburtonwest Tom Burton-West
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: