Re: Pagination with solr json data
All you have to do is use the start and rows parameters to get the results you want. For example, the query for the first page of results might look like this, ?q=solrstart=0rows=10 (other params omitted). So you'll start at the beginning (0) and get 10 results. They next page would be ?q=solrstart=10rows=10 - start at the 10th result and display the next 10 rows. Then ?q=solrstart=20rows=10, and so on. -Jay http://www.lucidimagination.com On Wed, Sep 9, 2009 at 12:24 PM, Elaine Li elaine.bing...@gmail.com wrote: Hi, What is the best way to do pagination? I searched around and only found some YUI utilities can do this. But their examples don't have very close match to the pattern I have in mind. I would like to have pretty plain display, something like the search results from google. Thanks. Elaine
Re: Pagination with Solr
ok! gracias ryguasu por tu respuesta, mira que ahora que recuerdo si hay un setStart y setRows trataré con eso y espero poder terminar mi proyecto, 1000 gracias =) -- View this message in context: http://www.nabble.com/Pagination-with-Solr-tp13847908p20650529.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Pagination with Solr
Hola! soy nueva en solr, lo estoy usando para mi proyecto de residencias, el problema que tengo es similar al que dice david, necesito enviar todos los resultados de cierta consulta al cliente, sin embargo siempre puedo obtener solamente 10, los diez primeros, y yo necesito obtener todos, yo estoy usando solrj y puedo obtener el numfound, sin embargo no puedo obtener todos los resultados =(, hay alguien que pueda ayudarme? gracias =) -- View this message in context: http://www.nabble.com/Pagination-with-Solr-tp13847908p20628504.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Pagination with Solr
Yo no suelo usar solrj, pero creo que quiere investigar SolrQuery.setStart() y SolrQuery.setRows(). Creo que el primero es para indicar el numero del primero resultado que quere obtener y el segundo es para indicar cuantos resultados quiere obtener. Si quere todos los resultados, probablemente va a querer hacer un loop, pidiendo 10 o 100 1000 cada vez. 2008/11/21 lupiss [EMAIL PROTECTED]: Hola! soy nueva en solr, lo estoy usando para mi proyecto de residencias, el problema que tengo es similar al que dice david, necesito enviar todos los resultados de cierta consulta al cliente, sin embargo siempre puedo obtener solamente 10, los diez primeros, y yo necesito obtener todos, yo estoy usando solrj y puedo obtener el numfound, sin embargo no puedo obtener todos los resultados =(, hay alguien que pueda ayudarme? gracias =) -- View this message in context: http://www.nabble.com/Pagination-with-Solr-tp13847908p20628504.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Pagination with Solr
: What I'm trying is to parse the response for numFound:some number : and if this number is greater than the rows parameter, I send another : search request to Solr with a new start parameter. Is there a better : way to do this? Specifically, is there another way to obtain the : numFound rather than parsing the response stream/string? i really don't understand your question ... how do you get any useful information from Solr unless you parse the responses to your requests? -Hoss
Re: Pagination with Solr
Hi David, Do you use one of Solr client available http://wiki.apache.org/solr/IntegratingSolr? These clients should probably have done all the XML parsing jobs for you. I speak from Solrj experience. IMO, your approach is probably most commonly used when it comes to pagination. Solr caching mechanisms should speed up the request for next page. Cheers, On Nov 20, 2007 10:27 AM, Dave C. [EMAIL PROTECTED] wrote: Hello again, I'm trying to accomplish very basic pagination with my Solr search results. What I'm trying is to parse the response for numFound:some number and if this number is greater than the rows parameter, I send another search request to Solr with a new start parameter. Is there a better way to do this? Specifically, is there another way to obtain the numFound rather than parsing the response stream/string? Thanks a lot, David _ Share life as it happens with the new Windows Live.Download today it's FREE! http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007 -- Regards, Cuong Hoang