Why not have your app query admin/stats and cache the numDocs variable
and just add it to each page you display? That way you'd only
have to call the stats component once.

Well, actually, you'd have to periodically call it to catch index updates,
but you'd cut down the number of queries.

Although an even simpler way would be to query for *:* and cache
the number of results in your app for future reference.

Best
Erick

On Fri, Oct 28, 2011 at 5:48 AM, Robert Brown <r...@intelcompute.com> wrote:
> Cheers Kuli,
>
> This is actually of huge importance to our customers, to see how many
> documents we store.
>
> The faceting option sounds a bit messy, maybe we'll have to stick with
> 2 queries.
>
>
> ---
>
> IntelCompute
> Web Design & Local Online Marketing
>
> http://www.intelcompute.com
>
> On Fri, 28 Oct 2011 11:43:11 +0200, Michael Kuhlmann <k...@solarier.de>
> wrote:
>> Am 28.10.2011 11:16, schrieb Robert Brown:
>>> Is there no way to return the total number of docs as part of a search?
>>
>> No, it isn't. Usually this information is of absolutely no value to the
>> end user.
>>
>> A workaround would be to add some field to the schema that has the same
>> value for every document, and use this for facetting.
>>
>> Greetings,
>> Kuli
>
>

Reply via email to