Some additional information:
The luke handle indicates the field should have doc values:

sort_currency_type_price____l_ns": {
"type": "long",
"schema": "I--D------OF------",
"dynamicBase": "*_l_ns"
}

However even if I do a separate exists function query outside of the
currency field code I still get the missing doc values error.

On Mon, May 11, 2026 at 10:48 AM Geren White <[email protected]> wrote:

> Hello,
>
> Is anyone using the CurrencyFieldTypes in solr 9? We are upgrading from 8
> and switching from the deprecated field. I have the field defined like this:
> <fieldType name="currency_type" class="solr.CurrencyFieldType"
>               defaultCurrency="USD"
>               amountLongSuffix="_l_ns"
>               codeStrSuffix="_s_ns"
>               refreshInterval="720"
>               providerClass="com.dibs.solr.CustomExchangeRatesProvider"/>
>
> And the dynamic fields defined like this:
> <dynamicField name="*_l_ns" type="long" indexed="true" stored="false"
> multiValued="false" docValues="true"/>
>   <dynamicField name="*_s_ns" type="string" indexed="true" stored="false"
> multiValued="false" docValues="true"/>
>
> With this setup I get the following error:
> java.lang.IllegalStateException: unexpected docvalues type NONE for field
> 'sort_currency_type_price____l_ns' (expected=NUMERIC). Re-index with
> correct docvalues type.\n\tat
> org.apache.lucene.index.DocValues.checkField(DocValues.java:218)\n\tat
> org.apache.lucene.index.DocValues.getNumeric(DocValues.java:237)\n\tat
> org.apache.lucene.queries.function.valuesource.LongFieldSource.getNumericDocValues(LongFieldSource.java:122)\n\tat
> org.apache.lucene.queries.function.valuesource.LongFieldSource.getValues(LongFieldSource.java:65)\n\tat
> org.apache.lucene.queries.function.valuesource.SimpleBoolFunction.getValues(SimpleBoolFunction.java:48)\n\tat
> org.apache.lucene.queries.function.valuesource.SimpleBoolFunction.getValues(SimpleBoolFunction.java:34)\n\tat
> org.apache.solr.search.function.ValueSourceRangeFilter$FunctionRangeWeight.scorer(ValueSourceRangeFilter.java:117)\n\tat
> org.apache.lucene.search.Weight.scorerSupplier(Weight.java:135)\n\tat
> org.apache.lucene.search.Weight.bulkScorer(Weight.java:165)\n\tat
> org.apache.lucene.search.IndexSearcher.searchLeaf(IndexSearcher.java:7
>
> I tested with the sampletechproducts collection as well and noticed the
> same issue there to rule out the custom provider class. This is happening
> in version 9.9.0 and 9.10.0
>
> Thanks,
> --
> *Geren White | VP Engineering*
> *(e)* [email protected]
>


-- 
*Geren White | VP Engineering*
*(e)* [email protected]

Reply via email to