[xquery-talk] search hit count
Michael Kay
mhk at mhk.me.uk
Wed Jul 19 00:01:44 PDT 2006
> The count() function give me how
> many documents in which the search is found, but not the individual
> hit count.
I suspect you did something like
count($docs[x/y/z='hit'])
which would give you the number of $docs in which x/y/z='hit' is true.
Change this to
count($docs/x/y/z[.='hit'])
and you will get the number of z elements equal to 'hit'.
Michael Kay
http://www.saxonica.com/
More information about the talk
mailing list