solr increase number of digits that tint fields can store

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

solr increase number of digits that tint fields can store

Hakim Benoudjit
Hi,

I have a price field of type tint, from which I will generate a range facet.
And I have now some items in my index that exceed tint type limit (max
integer).
How do I increase tint max integer value?

Here is tint definition in schema.xml:

<fieldType name="tint" class="solr.TrieIntField" precisionStep="8"
positionIncrementGap="0"/>

Do I have to increase precisionStep=8? because an error occured when trying
to insert a number whose the # of digits = 10
Reply | Threaded
Open this post in threaded view
|

Re: solr increase number of digits that tint fields can store

Chris Hostetter-3

A TrieIntField field can never contain a value greater then java's
Integer.MAX_VALUE -- it doesn't matter what settings you use.

If you want to store larger values, you need to use a TrieLongField and
re-index.

https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/schema/TrieIntField.html
https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/schema/TrieLongField.html

: Do I have to increase precisionStep=8? because an error occured when trying

precisionStep has nothing to do with the max/min values that can be
indexed.  precisionStep controls the amount of precision used when
encoding additional terms to speed up range queries...

https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/schema/TrieField.html
https://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/NumericRangeQuery.html?is-external=true


-Hoss
http://www.lucidworks.com/
Reply | Threaded
Open this post in threaded view
|

Re: solr increase number of digits that tint fields can store

Hakim Benoudjit
Thanks that's the response I was searching for. And, I have confirmed that
I need to reindex my data because tlong isnt compatible with tint.


2014/1/9 Chris Hostetter <[hidden email]>

>
> A TrieIntField field can never contain a value greater then java's
> Integer.MAX_VALUE -- it doesn't matter what settings you use.
>
> If you want to store larger values, you need to use a TrieLongField and
> re-index.
>
>
> https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/schema/TrieIntField.html
>
> https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/schema/TrieLongField.html
>
> : Do I have to increase precisionStep=8? because an error occured when
> trying
>
> precisionStep has nothing to do with the max/min values that can be
> indexed.  precisionStep controls the amount of precision used when
> encoding additional terms to speed up range queries...
>
>
> https://lucene.apache.org/solr/4_6_0/solr-core/org/apache/solr/schema/TrieField.html
>
> https://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/NumericRangeQuery.html?is-external=true
>
>
> -Hoss
> http://www.lucidworks.com/
>