Hi Paras,

<field name="posting_id" type="pint" indexed="true" stored="true"
required="true" multiValued="false"/>

  <fieldType name="pint" class="solr.IntPointField" docValues="true"/>
  <fieldType name="pints" class="solr.IntPointField" docValues="true"
multiValued="true"/>
  <fieldType name="plong" class="solr.LongPointField" docValues="true"/>
  <fieldType name="plongs" class="solr.LongPointField" docValues="true"
multiValued="true"/>
  <fieldType name="point" class="solr.PointType" subFieldSuffix="_d"
dimension="2"/>
  <fieldType name="random" class="solr.RandomSortField" indexed="true"/>
  <fieldType name="string" class="solr.StrField" sortMissingLast="true"
docValues="true"/>
  <fieldType name="strings" class="solr.StrField" sortMissingLast="true"
docValues="true" multiValued="true"/>

Regards,

Anuj

On Mon, 9 Dec 2019 at 10:37, Paras Lehana <paras.leh...@indiamart.com>
wrote:

> Hi Anuj,
>
> Please post the part of your schema for this field and its fieldType.
>
> On Sat, 7 Dec 2019 at 10:38, Anuj Bhargava <anujb...@gmail.com> wrote:
>
> > Tried with plong, pint and string. Reindexed after each change. The sort
> > results on numeric values being shown are the same -
> > Ascending
> > 1
> > 10
> > 100
> > 2
> > 2100
> > 3
> >
> > Descending
> > 9999
> > 999
> > 99
> > 9
> > 888888
> > 88
> > 77777777
> >
> > On Fri, 6 Dec 2019 at 17:15, Anuj Bhargava <anujb...@gmail.com> wrote:
> >
> > > Numeric sorting. Did the re-indexing. But didn't work.
> > >
> > > Regards,
> > >
> > > Anuj
> > >
> > > On Fri, 6 Dec 2019 at 16:44, Munendra S N <sn.munendr...@gmail.com>
> > wrote:
> > >
> > >> >
> > >> > What should I use for numeric search.
> > >>
> > >> numeric search or numeric sorting?
> > >>
> > >>  I tried with pint also, but the result was the same.
> > >>
> > >> It should have worked. please make sure data is reindexed after
> > fieldType
> > >> changes
> > >>
> > >> Regards,
> > >> Munendra S N
> > >>
> > >>
> > >>
> > >> On Fri, Dec 6, 2019 at 4:10 PM Anuj Bhargava <anujb...@gmail.com>
> > wrote:
> > >>
> > >> > I tried with pint also, but the result was the same. What should I
> use
> > >> for
> > >> > numeric search.
> > >> >
> > >> > Regards,
> > >> >
> > >> > Anuj
> > >> >
> > >> > On Fri, 6 Dec 2019 at 15:55, Munendra S N <sn.munendr...@gmail.com>
> > >> wrote:
> > >> >
> > >> > > Hi Anuj,
> > >> > > As the field type is String, lexicographical sorting is done, not
> > >> numeric
> > >> > > sorting.
> > >> > >
> > >> > > Regards,
> > >> > > Munendra S N
> > >> > >
> > >> > >
> > >> > >
> > >> > > On Fri, Dec 6, 2019 at 3:12 PM Anuj Bhargava <anujb...@gmail.com>
> > >> wrote:
> > >> > >
> > >> > > > When I sort desc on posting_id sort=posting_id%20desc, I get the
> > >> > > following
> > >> > > > result
> > >> > > > "posting_id":"9999313"
> > >> > > > "posting_id":"9999312"
> > >> > > > "posting_id":"9999310"
> > >> > > >
> > >> > > > When I sort asc on posting_id sort=posting_id%20asc, I get the
> > >> > following
> > >> > > > result
> > >> > > > "posting_id":"10005343"
> > >> > > > "posting_id":"10005349"
> > >> > > > "posting_id":"10005359"
> > >> > > >
> > >> > > > *In descending the 8 figure numbers are not coming up first and
> in
> > >> > > > ascending the 7 figure numbers are not coming up first.*
> > >> > > >
> > >> > > > Entry in schema is -
> > >> > > > <field name="posting_id" type="string" indexed="true"
> > stored="true"
> > >> > > > required="true" docValues="true" multiValued="false"/>
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> >
>
>
> --
> --
> Regards,
>
> *Paras Lehana* [65871]
> Development Engineer, Auto-Suggest,
> IndiaMART Intermesh Ltd.
>
> 8th Floor, Tower A, Advant-Navis Business Park, Sector 142,
> Noida, UP, IN - 201303
>
> Mob.: +91-9560911996
> Work: 01203916600 | Extn:  *8173*
>
> --
> *
> *
>
>  <https://www.facebook.com/IndiaMART/videos/578196442936091/>
>

Reply via email to