How to sort two fields in Solr 3.6

前端 未结 2 683
醉梦人生
醉梦人生 2021-02-19 11:49

In the web request url there is a \"sort\" option. However, how do i sort by two fields? If I do something like:

 sort=field1 asc&sort=field2 desc


        
相关标签:
2条回答
  • 2021-02-19 12:01

    you do it this way:

    sort=field1 asc, field2 desc
    
    0 讨论(0)
  • 2021-02-19 12:02

    SOLR(3.6.2) but if you want to sort additional intField in couple with 'score'
    try to search instead of:

    sort=score desc,intField desc
    

    this one:

    sort=intField desc,score desc
    
    0 讨论(0)
提交回复
热议问题