Jack, this is what I thought. It will be near impossible to achieve this. I will negotiate with the rest of the team to simplify this.
Thanks a lot. * ---------------------------------------------------------------------------------------------- * *"E conhecereis a verdade, e a verdade vos libertará." (João 8:32)* *andre.maldonado*@gmail.com <andre.maldon...@gmail.com> (11) 9112-4227 <http://www.orkut.com.br/Main#Profile?uid=2397703412199036664> <http://www.facebook.com/profile.php?id=100000659376883> <http://twitter.com/andremaldonado> <https://profiles.google.com/105605760943701739931> <http://www.linkedin.com/pub/andr%C3%A9-maldonado/23/234/4b3> <http://www.youtube.com/andremaldonado> On Mon, Aug 5, 2013 at 10:36 AM, Jack Krupansky <j...@basetechnology.com>wrote: > Unless you disclose your specific relevancy requirements, there's not much > we can do to help you. > > So, based on what you have disclosed, the answer is that you need to "over > query", request say twice as many documents as you need and then filter on > the application side. > > And then you may need to do up to three queries. First query all three > categories. If you don’t' get your quota for all categories, then do a > second "over query" that excludes the categories that were filled. And if > even that second query does not fill the third category, do a third query > that includes only that category - and it doesn't need to be an over-query > since only that category will be returned. > > > -- Jack Krupansky > > -----Original Message----- From: André Maldonado > Sent: Monday, August 05, 2013 9:28 AM > To: solr-user@lucene.apache.org > Subject: Re: Query to return different types of documents based on a field > > > Hi Jack, thanks for your reply and sorry for my bad english. > > Yes, I have other relevancy rules. All of them are calculated and stored in > a single field, so we just order based on that. > > I think I understood what you said, but how I will paginate? I'll have to > get all the documents for this query from solr and later, in the > application, create the pages. So, if this result consists in 2.000 docs, > this will be impossible. > > Thanks. > > * > ------------------------------**------------------------------** > ------------------------------**---- > * > *"E conhecereis a verdade, e a verdade vos libertará." (João 8:32)* > > *andre.maldonado*@gmail.com <andre.maldon...@gmail.com> > (11) 9112-4227 > > <http://www.orkut.com.br/Main#**Profile?uid=**2397703412199036664<http://www.orkut.com.br/Main#Profile?uid=2397703412199036664> > > > <http://www.facebook.com/**profile.php?id=100000659376883<http://www.facebook.com/profile.php?id=100000659376883> > **> > <http://twitter.com/**andremaldonado <http://twitter.com/andremaldonado>> > > <https://profiles.google.com/**105605760943701739931<https://profiles.google.com/105605760943701739931> > > > <http://www.linkedin.com/pub/**andr%C3%A9-maldonado/23/234/**4b3<http://www.linkedin.com/pub/andr%C3%A9-maldonado/23/234/4b3> > > > > <http://www.youtube.com/**andremaldonado<http://www.youtube.com/andremaldonado> > > > > > > On Fri, Aug 2, 2013 at 1:48 PM, Jack Krupansky <j...@basetechnology.com>** > wrote: > > You must have some other relevancy rules, right? Otherwise, for every 10 >> results you wish to display, just take the top 7 pizza results, then the >> first 2 bread results, and then the top healthy result. But... I suspect >> that this would not be acceptable because... you have additional rules >> that >> you are not disclosing. So, disclose them. >> >> -- Jack Krupansky >> >> -----Original Message----- From: André Maldonado >> Sent: Friday, August 02, 2013 12:42 PM >> To: solr-user@lucene.apache.org >> Subject: Query to return different types of documents based on a field >> >> >> Hi all. >> >> In my recipes website I want to create a page where users can browse and >> the return must be based on this rule: >> >> - 70% of the results must be pizzas (type:pizza) >> - 20% of the results must be breads (type:bread) >> - 10% of the results must be healthy (type:healthy) >> >> But I don't know how to query and paginate for this. I barely can achieve >> this with 3 different queries, but this is not what I want. >> >> There's way to do this? >> >> Thanks in advance. >> >> * >> ------------------------------****----------------------------**--** >> ------------------------------****---- >> >> * >> *"E conhecereis a verdade, e a verdade vos libertará." (João 8:32)* >> >> *andre.maldonado*@gmail.com <andre.maldon...@gmail.com> >> (11) 9112-4227 >> >> <http://www.orkut.com.br/Main#****Profile?uid=****2397703412199036664<http://www.orkut.com.br/Main#**Profile?uid=**2397703412199036664> >> <http://**www.orkut.com.br/Main#Profile?**uid=2397703412199036664<http://www.orkut.com.br/Main#Profile?uid=2397703412199036664> >> > >> > >> <http://www.facebook.com/****profile.php?id=100000659376883<http://www.facebook.com/**profile.php?id=100000659376883> >> **<http://www.facebook.com/**profile.php?id=100000659376883<http://www.facebook.com/profile.php?id=100000659376883> >> **> >> **> >> <http://twitter.com/****andremaldonado<http://twitter.com/**andremaldonado>< >> http://twitter.com/**andremaldonado <http://twitter.com/andremaldonado>>> >> >> <https://profiles.google.com/****105605760943701739931<https://profiles.google.com/**105605760943701739931> >> <https:/**/profiles.google.com/**105605760943701739931<https://profiles.google.com/105605760943701739931> >> > >> > >> <http://www.linkedin.com/pub/****andr%C3%A9-maldonado/23/234/****4b3<http://www.linkedin.com/pub/**andr%C3%A9-maldonado/23/234/**4b3> >> <http://www.linkedin.com/**pub/andr%C3%A9-maldonado/23/**234/4b3<http://www.linkedin.com/pub/andr%C3%A9-maldonado/23/234/4b3> >> > >> > >> >> <http://www.youtube.com/****andremaldonado<http://www.youtube.com/**andremaldonado> >> <http://www.**youtube.com/andremaldonado<http://www.youtube.com/andremaldonado> >> >> >> >> >> >