Not sure why you cross-posted this, my answer stands the same:

"As an integer 0045 or 000000000000045 or 45 is exactly the same value in
the decimal positional format.

I agree with Charlie, if you need it to be a string, then use a string.
You can potentially just use the string as a stored value, a copy field if
you like, and keep the original indexed as an integer to do math search
operations on.
"

--------------------------
*Alessandro Benedetti*
Director @ Sease Ltd.
*Apache Lucene/Solr Committer*
*Apache Solr PMC Member*

e-mail: a.benede...@sease.io


*Sease* - Information Retrieval Applied
Consulting | Training | Open Source

Website: Sease.io <http://sease.io/>
LinkedIn <https://linkedin.com/company/sease-ltd> | Twitter
<https://twitter.com/seaseltd> | Youtube
<https://www.youtube.com/channel/UCDx86ZKLYNpI3gzMercM7BQ> | Github
<https://github.com/seaseltd>


On Tue, 4 Jul 2023 at 08:42, Mikhail Khludnev <m...@apache.org> wrote:

> Hello Shubham.
> Storing 45 takes _less than_ one byte, Storing "0045" about four. I think
> Solr just made a reasonable choice.
>
>
> On Tue, Jul 4, 2023 at 9:47 AM John Jackson <john382...@gmail.com> wrote:
>
> > Hello All,
> >
> >
> > Recently I got a response but Whenever we are inserting this value in the
> > Database value is *0045*. the value showing in the listing is also
> *0045*.
> > but whenever we try to insert the value in *0045* it saves *45* in Solr.
> So
> > how can we achieve *0045* in solr for same?
> >
> > But if we are using copyField it leads to a large indexing space issue.
> So
> > is there any other way to achieve the goal to save *0045* in Solr?
> >
> >
> >
> > Any solution to achieve this goal.
> >
> >
> >
> > Thanks & Regards,
> >
> > Shubham Panchal
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Reply via email to