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

CurrencyField should support/default to docvalues for underlying polyfields

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.7, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Noticed while working on SOLR-10472, This is currently in CurrencyField ...

        private void createDynamicCurrencyField(String suffix, FieldType type) {
          String name = "*" + POLY_FIELD_SEPARATOR + suffix;
          Map<String, String> props = new HashMap<>();
          props.put("indexed", "true");
          props.put("stored", "false");
          props.put("multiValued", "false");
          props.put("omitNorms", "true");
          int p = SchemaField.calcProps(name, type, props);
          schema.registerDynamicFields(SchemaField.create(name, type, p, null));
        }
      // ...
        @Override
        public void inform(IndexSchema schema) {
          this.schema = schema;
          createDynamicCurrencyField(FIELD_SUFFIX_CURRENCY,   fieldTypeCurrency);
          createDynamicCurrencyField(FIELD_SUFFIX_AMOUNT_RAW, fieldTypeAmountRaw);
        }
      

      ...this code should probably be changed to use docValues by default – or at the very least use the indexed/docValues options from the original (user configured) CurrencyField when creating the underlying poly-fields. (although in this case we'll want to be careful to ensure that if it's docValues=true we should only end up with 2 sets of docValues – suffix_raw & suffix_currency – and not 3, including the original)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                steve_rowe Steve Rowe
                Reporter:
                hossman Hoss Man
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: