[MarkLogic Dev General] search:search to return the entire result count

Geert Josten geert.josten at dayon.nl
Fri Nov 11 06:29:10 PST 2011


The other day I was displaying tweets (stored within ML) unconstrained,
unpaged in the browser. Doing so with 50.000 of them made my FireFox
browser crash. J (And tweets aren’t even that big! ;-)



Kind regards,

Geert



*Van:* general-bounces at developer.marklogic.com [mailto:
general-bounces at developer.marklogic.com] *Namens *Damon Feldman
*Verzonden:* vrijdag 11 november 2011 15:21
*Aan:* mano m; General MarkLogic Developer Discussion
*Onderwerp:* Re: [MarkLogic Dev General] search:search to return the entire
result count



Mano,



search:search() is designed to avoid common problems, such as loading more
documents into memory than the machine supports, so it does not return all
matching documents from the entire databse regardless of size. However, you
can specify the start and end values to be large enough that any
reasonble data set will come back (reasonable = will be fast enough for
your application response times and will fit into memory).



This constraint is actually helpful in this situation because it forces you
to think about "big data" problems such as how much data is too much. If
your machine can only handle 2,000 documents and you want to pull back
50,000 you would then take another approach such as breaking the task up
into batches.



Yours,
Damon
------------------------------

*From:* general-bounces at developer.marklogic.com [
general-bounces at developer.marklogic.com] On Behalf Of mano m [
mano07good at yahoo.co.in]
*Sent:* Friday, November 11, 2011 6:19 AM
*To:* general at developer.marklogic.com
*Subject:* [MarkLogic Dev General] search:search to return the entire
result count

Hi all,



In search:search by default it will return 10 results and if  we specify
the start , end values then specific resultset will be returned.



But I want the entire search result set similar to cts:search.



Please let me know is there any possibility to return the entire results.



Thanks in Advance



Regards,

Mano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20111111/41a294b8/attachment.html 


More information about the General mailing list