[ 
https://issues.apache.org/jira/browse/SOLR-10503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16060239#comment-16060239
 ] 

Hoss Man commented on SOLR-10503:
---------------------------------

bq.  ... I had to introduce a boolean configuredSubFieldSuffixes (name 
suggested by you earlier) ...

Hmm, that suggestion was made in the context of "Even if I'm in the minority 
and most folks don't like the idea of requiring users to configure..."  -- ie: 
if that single class needed to support both configurable suffixes and implicit 
suffixes.

As things stand now, can't we eliminate that variable and just do...

{code}
  public void inform(IndexSchema schema) {
    this.schema = schema;
    if (null == fieldTypeAmountRaw) {
      assert null != fieldSuffixAmountRaw : "How did we get here?";
      SchemaField field = schema.getFieldOrNull(POLY_FIELD_SEPARATOR + 
fieldSuffixAmountRaw);
      if (field == null) {
        throw new SolrException(ErrorCode.SERVER_ERROR, "Field type \"" + 
this.getTypeName()
            + "\": Undefined dynamic field for " + 
PARAM_FIELD_SUFFIX_AMOUNT_RAW + "=\"" + fieldSuffixAmountRaw + "\"");
      }
      fieldTypeAmountRaw = field.getType();
      if (!(fieldTypeAmountRaw instanceof LongValueFieldType)) {
        throw new SolrException(ErrorCode.SERVER_ERROR, "Field type \"" + 
this.getTypeName()
            + "\": Dynamic field for " + PARAM_FIELD_SUFFIX_AMOUNT_RAW + "=\"" 
+ fieldSuffixAmountRaw
            + "\" must have type class extending LongValueFieldType");
      }
    }
    if (null == fieldTypeCurrency) {
      assert null != fieldSuffixCurrency : "How did we get here?";
      SchemaField field = schema.getFieldOrNull(POLY_FIELD_SEPARATOR + 
fieldSuffixCurrency);
      if (field == null) {
        throw new SolrException(ErrorCode.SERVER_ERROR, "Field type \"" + 
this.getTypeName()
            + "\": Undefined dynamic field for " + PARAM_FIELD_SUFFIX_CURRENCY 
+ "=\"" + fieldSuffixCurrency + "\"");
      }
      fieldTypeCurrency = field.getType();
      if (!(fieldTypeCurrency instanceof StrField)) {
        throw new SolrException(ErrorCode.SERVER_ERROR, "Field type \"" + 
this.getTypeName()
            + "\": Dynamic field for " + PARAM_FIELD_SUFFIX_CURRENCY + "=\"" + 
fieldSuffixCurrency
            + "\" must have type class of (or extending) StrField");
      }
    }
  }
{code}

?

> CurrencyField should be changed from TrieLongField to LongPointField for 
> underlying raw-polyfield
> -------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-10503
>                 URL: https://issues.apache.org/jira/browse/SOLR-10503
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>         Attachments: SOLR-10503.patch, SOLR-10503.patch, SOLR-10503.patch, 
> SOLR-10503.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to