The separate sort parameter for the standard handler is relatively new
(as of Solr 1.2)
Is that the version of Solr you are using?  If so, can you also supply
the output Solr gives you as the result of your query?

-Yonik

On 8/23/07, mel2k <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am new to Solr and trying to understand how the sort functionality is
> working. Thanks in advance for your help on the following questions.
>
> I have taken the default download, started Solr and posted the mem.xml. I
> updated the mem.xml by copying each of the items and changing ONLY the id
> and price fields. The xml file is shown below. Now when I sort by price it
> does not seem to work. Simply shows me the documents in the order I have
> inserted.  I was expecting the results that matched the term to be sorted by
> price despite the 'score'.
>
> 1. What am I doing wrong?
> 2. Does the 'score' overwrite any sort parameter? Or how do I get the list
> that match 'sdram' in name field sorted by price?
>
>
> Query:
> http://localhost:8983/solr/select?q=name%3A%28sdram%29&sort=price%20asc&version=2.1&start=0&rows=100&fl=name+price+score&qt=standard
>
> Results:
>
> <response>
> −
>         <responseHeader>
> <status>0</status>
> <QTime>0</QTime>
> −
>         <lst name="params">
> <str name="sort">price asc</str>
> <str name="fl">name price score</str>
> <str name="start">0</str>
> <str name="q">name:(sdram)</str>
> <str name="qt">standard</str>
> <str name="version">2.1</str>
> <str name="rows">100</str>
> </lst>
> </responseHeader>
> −
>         <result name="response" numFound="6" start="0" maxScore="0.30217415">
> −
>         <doc>
> <float name="score">0.30217415</float>
> −
>         <str name="name">
> CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200)
> System Memory - Retail
> </str>
> <float name="price">374.99</float>
> </doc>
> −
>         <doc>
> <float name="score">0.30217415</float>
> −
>         <str name="name">
> A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System
> Memory - OEM
> </str>
> </doc>
> −
>         <doc>
> <float name="score">0.30217415</float>
> −
>         <str name="name">
> CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200)
> System Memory - Retail
> </str>
> <float name="price">274.99</float>
> </doc>
> −
>         <doc>
> <float name="score">0.30217415</float>
> −
>         <str name="name">
> A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200) System
> Memory - OEM
> </str>
> </doc>
> −
>         <doc>
> <float name="score">0.2590064</float>
> −
>         <str name="name">
> CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200)
> Dual Channel Kit System Memory - Retail
> </str>
> <float name="price">3185.0</float>
> </doc>
> −
>         <doc>
> <float name="score">0.2590064</float>
> −
>         <str name="name">
> CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered DDR 400 (PC 3200)
> Dual Channel Kit System Memory - Retail
> </str>
> <float name="price">2185.0</float>
> </doc>
> </result>
> </response>
>
> Data file posted:
>
> <?xml version="1.0" ?>
> <add>
> <doc>
>   <field name="id">TWINX2048-3200PRO</field>
>   <field name="name">CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered
> DDR 400 (PC 3200) Dual Channel Kit System Memory - Retail</field>
>   <field name="manu">Corsair Microsystems Inc.</field>
>   <field name="cat">electronics</field>
>   <field name="cat">memory</field>
>   <field name="features">CAS latency 2, 2-3-3-6 timing, 2.75v, unbuffered,
> heat-spreader</field>
>   <field name="price">3185</field>
>   <field name="popularity">5</field>
>   <field name="inStock">true</field>
> </doc>
>
> <doc>
>   <field name="id">VS1GB400C3</field>
>   <field name="name">CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered
> DDR 400 (PC 3200) System Memory - Retail</field>
>   <field name="manu">Corsair Microsystems Inc.</field>
>   <field name="cat">electronics</field>
>   <field name="cat">memory</field>
>   <field name="price">374.99</field>
>   <field name="popularity">7</field>
>   <field name="inStock">true</field>
> </doc>
>
> <doc>
>   <field name="id">VDBDB1A16</field>
>   <field name="name">A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR
> 400 (PC 3200) System Memory - OEM</field>
>   <field name="manu">A-DATA Technology Inc.</field>
>   <field name="cat">electronics</field>
>   <field name="cat">memory</field>
>   <field name="features">CAS latency 3,  2.7v</field>
>   <!-- note: price is missing on this one -->
>   <field name="popularity">5</field>
>   <field name="inStock">true</field>
>
> </doc>
> <doc>
>   <field name="id">2TWINX2048-3200PRO</field>
>   <field name="name">CORSAIR XMS 2GB (2 x 1GB) 184-Pin DDR SDRAM Unbuffered
> DDR 400 (PC 3200) Dual Channel Kit System Memory - Retail</field>
>   <field name="manu">2Corsair Microsystems Inc.</field>
>   <field name="cat">electronics</field>
>   <field name="cat">memory</field>
>   <field name="features">CAS latency 2, 2-3-3-6 timing, 2.75v, unbuffered,
> heat-spreader</field>
>   <field name="price">2185</field>
>   <field name="popularity">5</field>
>   <field name="inStock">true</field>
> </doc>
>
> <doc>
>   <field name="id">2VS1GB400C3</field>
>   <field name="name">CORSAIR ValueSelect 1GB 184-Pin DDR SDRAM Unbuffered
> DDR 400 (PC 3200) System Memory - Retail</field>
>   <field name="manu">2Corsair Microsystems Inc.</field>
>   <field name="cat">electronics</field>
>   <field name="cat">memory</field>
>   <field name="price">274.99</field>
>   <field name="popularity">7</field>
>   <field name="inStock">true</field>
> </doc>
>
> <doc>
>   <field name="id">2VDBDB1A16</field>
>   <field name="name">A-DATA V-Series 1GB 184-Pin DDR SDRAM Unbuffered DDR
> 400 (PC 3200) System Memory - OEM</field>
>   <field name="manu">2A-DATA Technology Inc.</field>
>   <field name="cat">electronics</field>
>   <field name="cat">memory</field>
>   <field name="features">CAS latency 3,  2.7v</field>
>   <!-- note: price is missing on this one -->
>   <field name="popularity">5</field>
>   <field name="inStock">true</field>
>
> </doc>
>
> </add>
>
> --
> View this message in context: 
> http://www.nabble.com/Sort-basics-tf4317085.html#a12292143
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to