Documentation
TODO
Parameters
- DAYS: number of recent days of changes to take under consideration, defaults to unlimited
- RECENCY: maximum number of topics to harvest tags from, defaults to 100; a value of "all" will render a tag cloud considering all matching documents
- LIMIT: maximum number of tags in the could, defaults to 100
- MIN: minimum frequency of a tags to be shown
- TAG: comma separated list of tags to be searched for in the archive
- CAT: restrict tag cloud to this category; displays all tags of all categories if unspecified
- KEYWORDS: keywords to filter for
- THEWEB: web to restrict search to, defaults to all
- TYPE: content type to restrict results to, e.g. "topic" (default), "image", "video", "pdf", "zip", …
Implementation
%STARTINCLUDE%<noautolink>
%DBCALL{"%WEB%.%TOPIC%"
section="search"
keywords="%KEYWORDS{default=""}%"
theweb="%SUBST{text="%THEWEB{default="all"}%" pattern="/" format="."}%"
limit="%LIMIT{default="100"}%"
filter="type:%TYPE{default="topic"}% %IF{"defined THEWEB and $THEWEB!='all'"
then="web:%SUBST{text="%THEWEB{default=""}%" pattern="/" format="."}%"
}% %IF{"defined TAG"
then="$percntFORMATLIST{\"%TAG%\" split=\"\*s,\s*\" format=\"tag:$1\" separator=\", \"}$percnt"
}% %IF{"defined CAT"
then="$percntFORMATLIST{\"%CAT%\" split=\"\*s,\s*\" format=\"category:$1\" separator=\", \"}$percnt"
}% %IF{"defined DAYS"
then="date:\\"[NOW/DAY-%DAYS%DAY TO NOW]\\""
}%"
}% %TAGCLOUD{
terms="%SOLRFORMAT{
"solrtagcloud1"
format_tag="$key:$count,"
separator_tag=" "
}%"
header="<div class='solrTagCloud clsTagCloud'>"
format="<span style='font-size:$weightpx;line-height:110%'><a href='$percntSOLRSCRIPTURL{topic=\"%BASEWEB%.WebSearch\" tag=\"$term\" category=\"%CAT{default=""}%\" web=\"%SUBST{text="%THEWEB{default=""}%" pattern="/" format="."}%\" type=\"%TYPE{default=""}%\"}$percnt' style='color:$fadeRGB(%TAGCLOUD_START{default="111,169,255"}%,%TAGCLOUD_END{default="0,89,224"}%);' class='solrFacetValue' name='tag_$term' value='$term'>$term</a></span>"
footer="</div>"
group="<strong>$group</strong> "
split="\s*,\s*"
buckets="25"
offset="13"
warn="off"
min="%MIN{default="0"}%"
}%
</noautolink>%STOPINCLUDE%
%STARTSECTION{"search"}%<!-- -->
%SOLRSEARCH{
"%keywords%"
id="solrtagcloud1"
sort="date desc"
type="edismax"
fields=""
web="%theweb%"
filter="%filter% %IF{"$RECENCY != 'all'"
then="$percntSOLRSEARCH{\"%keywords%\"
sort=\"date desc\"
type=\"edismax\"
fields=\"id\"
web=\"%theweb%\"
filter=\"%filter%\"
rows=\"%RECENCY{default="100"}%\"
format=\"$id\"
separator=\" OR \"
header=\"id:(\"
footer=\")\"
}$percnt"}%"
facets="tag"
facetlimit="%limit%"
rows="30"
}%<!-- -->%ENDSECTION{"search"}%
Test
%SOLRSEARCH{
" "
id="solrtagcloud1"
sort="date desc"
type="dismax"
fields=""
web=""
filter="type:topic web:
"
facets="tag"
facetlimit="100"
rows="100"
}%
%TAGCLOUD{
terms="%SOLRFORMAT{
"solrtagcloud1"
format_tag="$key:$count"
separator_tag=", "
}%"
header="
"
format="
$term"
footer="
"
group="
$group "
split="\s*,\s*"
buckets="20"
offset="11"
warn="off"
min="1"
}%