I can't see a way of retrieving five results from one type and five from another in a single query. The only way I can think about that would have a similar behaviour would be:
?q=ContentType:(News+OR+Analysis)&sort=DatePublished+desc&start=0&rows=10 This way you'll have the first 10 results being News or Analysis, though it could be 7 News and 3 Analysis or even 10 and 0... If you need Solr to return 5 results from each type, I think the only way to improve the search speed would be, instead of using just one query, making two parallel queries. Regards 2010/7/15 Rupert Bates <rupert.ba...@guardian.co.uk> > Sorry, my mistake, the example should have been as follows: > > ?q=ContentType:News&sort=DatePublished+desc&start=0&rows=5 > ?q=ContentType:Analysis&sort=DatePublished+desc&start=0&rows=5 > > Rupert > > On 15 July 2010 13:02, kenf_nc <ken.fos...@realestate.com> wrote: > > > > Your example though doesn't show different ContentType, it shows a > different > > sort order. That would be difficult to achieve in one call. Sounds like > your > > best bet is asynchronous (multi-threaded) calls if your architecture will > > allow for it. > > -- > > View this message in context: > http://lucene.472066.n3.nabble.com/Query-help-tp969075p969334.html > > Sent from the Solr - User mailing list archive at Nabble.com. > > > > > > -- > Rupert Bates > > Software Development Manager > Guardian News and Media > > Tel: 020 3353 3315 > rupert.ba...@guardian.co.uk > Please consider the environment before printing this email. > ------------------------------------------------------------------ > Visit guardian.co.uk - newspaper website of the year > www.guardian.co.uk www.observer.co.uk > > To save up to 33% when you subscribe to the Guardian and the Observer > visit http://www.guardian.co.uk/subscriber > > The Guardian Public Services Awards 2010, in partnership with > Hays Specialist Recruitment, recognise and reward outstanding > performance from public, private and voluntary sector teams. > > To find out more and to nominate a deserving team or individual, > visit http://guardian.co.uk/publicservicesawards > > Entries close 16 July. > > --------------------------------------------------------------------- > > This e-mail and all attachments are confidential and may also > be privileged. If you are not the named recipient, please notify > the sender and delete the e-mail and all attachments immediately. > Do not disclose the contents to another person. You may not use > the information for any purpose, or store, or copy, it in any way. > > Guardian News & Media Limited is not liable for any computer > viruses or other material transmitted with or as part of this > e-mail. You should employ virus checking software. > > Guardian News & Media Limited > A member of Guardian Media Group PLC > Registered Office > Number 1 Scott Place, Manchester M3 3GG > Registered in England Number 908396 > > -- Alejandro Marqués Rodríguez Paradigma Tecnológico http://www.paradigmatecnologico.com Avenida de Europa, 26. Ática 5. 3ª Planta 28224 Pozuelo de Alarcón Tel.: 91 352 59 42