lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Multiple sorting does not work as expected
Date Tue, 06 Aug 2013 14:28:50 GMT
The Name field is sorted as you have requested - "desc". I suspect that you 
wanted name to be sorted "asc" (natural order.)

-- Jack Krupansky

-----Original Message----- 
From: Mysurf Mail
Sent: Tuesday, August 06, 2013 10:22 AM
To: solr-user@lucene.apache.org
Subject: Re: Multiple sorting does not work as expected

my schema

....
<field name="Name" type="text_en" indexed="true" stored="true"
required="true"/>
<field name="Version" type="int" indexed="true" stored="true" 
required="true"/>
....



On Tue, Aug 6, 2013 at 5:06 PM, Mysurf Mail <stammailbox@gmail.com> wrote:

> My documents has 2 indexed attribute - name (string) and version (number)
> I want within the same score the documents will be displayed by the
> following order
>
> score(desc),name(desc),version(desc)
>
> Therefor I query using :
>
> http://localhost:8983/solr/vault/select?
>            q=BOM&fl=*:score&
>            sort=score+desc,Name+desc,Version+desc
>
> And I get the following inside the result:
>
> <doc>
>    <str name="Name">BOM Total test2</str>
>    ...
>    <int name="Version">2</int>
>    ...
>    <float name="score">2.2388418</float>
> </doc>
> <doc>
>    <str name="Name">BOM Total test - Copy</str>
>    ...
>    <int name="Version">2</int>
>    ...
>    <float name="score">2.2388418</float>
> </doc>
> <doc>
>   <str name="Name">BOM Total test2</str>
>   ...
>   <int name="Version">1</int>
>   ...
>   <float name="score">2.2388418</float>
> </doc>
>
> The scoring is equal, but the name is not sorted.
>
> What am I doing wrong here?
> 


Mime
View raw message