apidoc::ad_keywords_score (private)

 apidoc::ad_keywords_score keywords string_to_search

Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl

Parameters:
keywords (required)
string_to_search (required)
Returns:
Number of keywords found in string to search. No additional score for repeats.

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-api-browser/www/proc-search.tcl packages/acs-api-browser/ www/proc-search.tcl apidoc::ad_keywords_score apidoc::ad_keywords_score packages/acs-api-browser/www/proc-search.tcl->apidoc::ad_keywords_score

Testcases:
No testcase defined.
Source code:
        # turn keywords into space-separated things
        # replace one or more commands with a space
        regsub -all -- {,+} $keywords " " keywords

        set score 0
        foreach word $keywords {
            # turns out that "" is never found in a search, so we
            # don't really have to special case $word eq ""
            if {[string match -nocase "*$word*" $string_to_search]} {
                incr score
            }
        }
        return $score
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: