:   I'm  facing a problem with multiple field sort in Solr. I'm using the
: following fields in sort :
: 
: PublishDate asc,DocumentType asc

correction: you are using: PublishDate desc,DocumentType desc

: The sort is only happening on PublishDate, DocumentType seemsto completely
: ignored. Here's my field type definition.

the results you posted are perfectly sorted according to the criteria in 
your URL... 

2015-01-17, 2014-11-17, 2013-01-17, 2012-10-17, 2012-01-17, 2011-01-17, 
then 2 docs from 2006-01-17 correctly ordered by secondary sort: "O" 
before "H".

...did you not post the query/results you ment to post?  what exactly is 
it about the result ordering that you are getting do you think is 
incorrect?

: <result name="response" numFound="8" start="0">
: <doc>
: <date name="PublishDate">2015-01-17T00:00:00Z</date>
: <str name="DocumentType">Hotfixes</str>
: </doc>
: <doc>
: <date name="PublishDate">2014-11-17T00:00:00Z</date>
: <str name="DocumentType">Hotfixes</str>
: </doc>
: <doc>
: <date name="PublishDate">2013-01-17T00:00:00Z</date>
: <str name="DocumentType">Tutorials</str>
: </doc>
: <doc>
: <date name="PublishDate">2012-10-17T00:00:00Z</date>
: <str name="DocumentType">Service Packs</str>
: </doc>
: <doc>
: <date name="PublishDate">2012-01-17T00:00:00Z</date>
: <str name="DocumentType">Tutorials</str>
: </doc>
: <doc>
: <date name="PublishDate">2011-01-17T00:00:00Z</date>
: <str name="DocumentType">Tutorials </str>
: </doc>
: <doc>
: <date name="PublishDate">2006-01-17T00:00:00Z</date>
: <str name="DocumentType">Object Enablers</str>
: </doc>
: <doc>
: <date name="PublishDate">2006-01-17T00:00:00Z</date>
: <str name="DocumentType">Hotfixes</str>
: </doc>
: </result>
: 
: As you can see, the sorting happened only on PublishDate. I'm using Solr
: 4.7.
: 
: Not sure what I'm missing here, any pointers will be appreciated.
: 
: Thanks,
: Shamik
: 

-Hoss
http://www.lucidworks.com/

Reply via email to