#||
||
|{{toc numerate=1}} ||
||#
**Union** search, include results that match any of the whitespace separated keywords (##MATCH AGAINST IN BOOLEAN MODE## & ##LIKE lower##)
===Syntax===
* Call: ##""{{search [phrase="Term"] [page="PageName"] [options=0|1] [topic=1] [form=1] [nomark=1] [style=one of ("br","ul","ol","comma") ] [scope=one of ("pages", "all")]}}""##
* ##phrase## search term
* ##page## restricts the search to the specified namespace, use ##page="/"## on sub-pages to search all clusters
* ##options## - with the value 0 only the search field is displayed, other options and filters are hidden
* ##topic## it is possible to call ##title## — if it is advanced into 1, then search occurs only on the names of pages, otherwise both on the names and on the texts;
* ##form## — indicates that it is necessary to derive the form of search together with the results.
* ##scope## answers for that, where to the search: only in the pages or in the commentaries also.
* ##max## — overwrites system default value
* ##nomark##, advanced in one, makes it possible to hide frame around the results of search.
* ##style## answers for the exterior view of results.
* All parameters are optional.
===Boolean Search Operators===
The ##MATCH AGAINST## clause in MySQL, when used with the ##IN BOOLEAN MODE## modifier, supports several operators to refine search queries. These operators include:
* ##+## (mandatory inclusion): The word following the plus sign must be present in the result.
* ##-## (exclusion): The word following the minus sign must not be present in the result.
* ##>## (increase ranking): The word following the greater-than sign is included, and its ranking value is increased.
* ##<## (decrease ranking): The word following the less-than sign is included, and its ranking value is decreased.
* ##()## (grouping): Parentheses are used to group words into subexpressions, allowing them to be treated as a single unit for inclusion, exclusion, or ranking.
* ##~## (negate ranking): The ranking value of the word following the tilde is negated.
* ##*## (wildcard): The asterisk serves as a truncation (or wildcard) operator, where words matching the prefix of the word preceding the asterisk are included. For example, ##sql*## finds words like "sql", "sqlite", etc..
* ##"## (phrase matching): Double quotes are used to define a phrase, requiring the entire phrase to be matched for inclusion or exclusion.
* [no operator] implies OR
These operators allow for complex and powerful searches, making the boolean mode suitable for experienced users who need precise control over search results.
====Resources===
* ((https://dev.mysql.com/doc/refman/8.4/en/fulltext-boolean.html Boolean Full-Text Searches))
* https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/full-text-indexes/full-text-index-overview
===Examples===
##~{{search phrase="BadBehaviour" page="/"}}##
{{search phrase="BadBehaviour" page="/" max=5}}
===See also===
* ((/Dev/PatchesHacks/BinaryStringSearch Binary string search)) - allows users to do a string search using **exact** or **regex** search.