Please disregard. This edit delivers counts for the current page of
results.  It does not provide an accurate total for the entire search.

On Wed, Jul 8, 2009 at 3:09 PM, Mattio
Valentino<[email protected]> wrote:
> I've edited search-impl.xqy line 877 as a dirty solution to this for
> now. The worst part about this is that it's not configurable, so it
> will fire for all searches.
>
>    (:let $estimate := if ($results) then cts:remainder($results[1]) +
> $start - 1 else 0:)
>    let $remainder := cts:remainder($results[1])
>    let $estimate :=
>                if ($results) then
>                        if($remainder + $start - 1 > 500) then
>                                $remainder + $start - 1
>                        else fn:count($results)
>                else 0
>
>
> ---------- Forwarded message ----------
> From: Mattio Valentino <[email protected]>
> Date: Tue, Jul 7, 2009 at 9:29 PM
> Subject: Search API: Counting using fn:count instead of cts:remainder
> To: General Mark Logic Developer Discussion <[email protected]>
>
>
> Is it possible to configure the Search API to use fn:count instead of
> cts:remainder in some cases?
>
> The issue I'm running into is that I have my fragment roots set for
> book chapters and encyclopedia entries, but now I have a search
> requirement to provide results at the book level, so
> search:response/@total consistently over-estimates the actual number
> of results by a wide margin.
>
> Thanks,
> Mattio
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to