|
Rupert Bates
2010-07-15, 09:55
kenf_nc
2010-07-15, 12:02
Rupert Bates
2010-07-15, 12:43
Alejandro Marqués Rodrígu...
2010-07-16, 07:27
Abhishek tiwari
2012-03-28, 13:02
|
-
Query helpRupert Bates 2010-07-15, 09:55
Hello, I hope someone can help me with this. I have a website which is
built on top of Solr and the home page is composed of 4 sections one for each type of content on the site. At the moment to populate this page, I am using 4 separate queries of the form: ?q=ContentType:News&sort=DatePublished+desc&start=0&rows=5 ?q=ContentType:News&sort=Analysis+desc&start=0&rows=5 etc. etc. Can anyone think of a way I could reduce this to one query which brings back the top 5 pieces of content for each content type by date? Thanks in advance Rupert -- Rupert Bates Software Development Manager Guardian New and Media Tel: 020 3353 3315 [EMAIL PROTECTED] 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
-
Re: Query helpkenf_nc 2010-07-15, 12:02
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.
-
Re: Query helpRupert Bates 2010-07-15, 12:43
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 <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] 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
-
Re: Query helpAlejandro Marqués Rodrígu... 2010-07-16, 07:27
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 <[EMAIL PROTECTED]> > 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 <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] > 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
-
query helpAbhishek tiwari 2012-03-28, 13:02
Hi ,
i have multi valued field want to sort the docs order the particular text eq:'B1' is added. how i should query? ad_text is multivalued field. t <doc> <arr name="ad_text"> <str>B1</str> <str>B2</str> <str>B3</str> </arr> </doc> <doc> <arr name="ad_text"> <str>B2</str> <str>B1</str> <str>B3</str> </arr> </doc> <doc> <arr name="ad_text"> <str>B1</str> <str>B2</str> <str>B3</str> </arr> </doc> <doc> <arr name="ad_text"> <str>B3</str> <str>B2</str> <str>B1</str> </arr> </doc> |