Why do you want to keep trailing zeros? The original input is
preserved in the "stored" portion and will be returned if you specify
the field in your "fl" list. I'm assuming here that you're looking at
the actual indexed terms, and don't really understand why the trailing
zeros are important

Do not use strings.

Best
Erick

On Tue, May 19, 2015 at 10:22 AM, Vishal Swaroop <vishal....@gmail.com> wrote:
> Thank you John and Jack...
>
> Looks like double is much closer... it removes trailing zeros...
> a) Is there a way to keep trailing zeros
> double : 194.846189733028000 indexes to 194.846189733028
> <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0"
> positionIncrementGap="0" omitNorms="false"/>
>
> b) If I use "String" then will there be issue doing range query
>
> float
> <fieldType name="float" class="solr.TrieFloatField" precisionStep="0"
> positionIncrementGap="0" omitNorms="false"/>
> 277.677836785372000 indexes to 277.67783
>
>
>
> On Tue, May 19, 2015 at 11:56 AM, Jack Krupansky <jack.krupan...@gmail.com>
> wrote:
>
>> "double" (solr.TrieDoubleField) gives more precision
>>
>> See:
>>
>> https://lucene.apache.org/solr/5_1_0/solr-core/org/apache/solr/schema/TrieDoubleField.html
>>
>> -- Jack Krupansky
>>
>> On Tue, May 19, 2015 at 11:27 AM, Vishal Swaroop <vishal....@gmail.com>
>> wrote:
>>
>> > Please suggest which numeric field type to use so that I can get complete
>> > value.
>> >
>> > e.g value in database is : 194.846189733028000
>> >
>> > If I index it as float SOLR indexes it as 194.84619 where as I need
>> > complete value i.e 194.846189733028000
>> > I will also be doing range query on this field.
>> >
>> > <fieldType name="float" class="solr.TrieFloatField" precisionStep="0"
>> > positionIncrementGap="0"/>
>> >
>> > <field name="value" type="float" indexed="true"  stored="true"
>> >  multiValued="false" />
>> >
>> > Regards
>> >
>>

Reply via email to