Help:CirrusSearch/fr

CirrusSearch est une extension pour MediaWiki qui utilise Elasticsearch pour ajouter des fonctionnalités de recherche avancées à l’outil de recherche de MediaWiki par défaut. La Fondation Wikimédia utilise CirrusSearch pour tous les projets Wikimédia. Cette page décrit les fonctionnalités de CirrusSearch. Si votre question ne trouve pas de réponse ici, n’hésitez pas à demander sur la page de discussion et quelqu’un vous y répondra.

Pour obtenir des informations sur l’extension MediaWiki, consultez Extension:CirrusSearch.

Quelles sont les améliorations ?
CirrusSearch apporte trois améliorations principales à l’outil de recherche par défaut de MediaWiki, à savoir :
 * Un meilleur support pour la recherche dans différentes langues.
 * Des mises à jour plus rapides pour l’indexation, ce qui veut dire que les changements seront visibles plus tôt dans les résultats de recherche.
 * Le développement des modèles, ce qui signifie que le rendu des modèles est pris en compte par la recherche.

À quelle fréquence l’index de recherche est-il mis à jour ?
L'indexation est réalisée presque en temps réel. Les modifications effectuées aux pages devraient être immédiatement répercutées dans les résultats de recherche. Les modifications apportées aux modèles devraient prendre effet dans les articles qui les incluent au bout de quelques minutes. Ces modifications passent par la file de travail ; les performances sont donc variables. Une modification nulle à l’article forcera la modification, mais cette opération ne devrait pas avoir lieu d’être si tout fonctionne correctement.

Suggestions de recherche
Les suggestions de recherche qui s’affichent lorsque vous entrez du texte dans la zone de recherche restent globalement identiques, les articles proposés étant triés par leur nombre de liens entrants. Les suggestions de recherche peuvent être sautées et les requêtes mèneront alors directement à la page des résultats de recherche. Ajouter un tilde  avant la requête, par ex. « ~Frida Kahlo ». Les suggestions de recherche apparaîtront toujours, mais appuyer sur la touche Entrée à tout instant vous conduira vers la page des résultats. Les caractères ASCII/accentués/avec diacritiques sont acceptés pour les requêtes en anglais, mais il y a quelques problèmes de formatage des résultats. Voir.

Recherche de texte complet
Une « recherche de texte complet » est une « recherche indexée ». Toutes les pages sont stockées dans la base de données du wiki, et tous les mots qu’ils contiennent sont stockés dans la base de données de recherche, un index vers le texte complet du wiki. Tout mot visible est indexé à la liste des pages où il est trouvé, de sorte que la recherche d’un mot soit aussi rapide que la consultation d’un seul document. De plus, pour tout changement dans la formulation, l’index de recherche est mis à jour en quelques secondes. Il existe de nombreux index du « texte complet » du wiki afin d’optimiser les nombreux types de recherches pris en charge. Le wikitexte complet est indexé de nombreuses fois dans de nombreux index à objectif spécifique, chacun d’entre eux parcourant le wikitexte de la manière qui leur est la plus profitable. Exemples d’index : Des dizaines de langues sont supportées mais il est projeté de prendre en charge toutes les langues à terme. Il y a une liste des langues actuellement supportées sur elasticsearch.org ; voir leur documentation pour savoir comment contribuer en soumettant des requêtes et des patchs. CirrusSearch optimisera votre requête et l’exécutera. Les titres résultants sont classés par pertinence, et fortement post-traités, 20 par 20, pour la page des résultats de recherche. Ainsi des extraits sont fournis, et les termes de recherche sont mis en gras.
 * Texte « auxiliaire », incluant les notes de chapeau, les légendes des objets, le sommaire, et tout wikitexte classé avec un attribut HTML class=searchaux.
 * Texte « dirigeant », wikitexte se situant entre le haut de la page et le premier titre de section.
 * Le texte « catégorie » indexe les listes présentées en pied de page.
 * Les modèles sont indexés. Si les mots transclus d’un modèle changent, toutes les pagent qui le transcluent sont alors mises à jour (cela peut prendre du temps selon la file de traitement). Si les sous-modèles utilisés par un modèle changent, l’index est également mis à jour.
 * Le contenu des documents stockés dans l’espace de noms File/Media sont aujourd’hui indexés. Des milliers de formats sont gérés.

Les résultats de recherche seront souvent accompagnés par diverses indications préliminaires, telles que « Vouliez-vous dire » (correction orthographique), et, lorsqu’il n’y a aucun résultat pour les termes recherchés, « Résultats affichés pour » (correction de requête) et « Afficher les résultats pour » (votre requête).

Les fonctionnalités de recherche incluent également :
 * Tri des suggestions de navigation en fonction du nombre de liens entrants.
 * Commencer par le caractère  pour désactiver la navigation et les suggestions de manière à préserver également le classement des pages.
 * Correspondance intelligente des caractères en normalisant (ou « pliant ») les caractères complexes en caractères basiques du clavier.* Les mots et expressions qui correspondent sont mis en valeur par du gras sur les résultats de recherche.

Mots, expressions et modificateurs
Le terme de recherche élémentaire est un mot ou une "expression entre guillemets". Un « mot » peut être : Un « mot d’arrêt » est un mot ignoré (parce qu’il est trop commun ou pour d’autres raisons). Un terme de recherche donné recherche dans le contenu (rendu affiché de la page). Pour rechercher dans le wikicode, il faut utiliser le paramètre de recherche insource (voir la section plus bas). Chaque paramètre de recherche possède son propre index et interprète le terme recherché de sa propre manière.
 * une suite de chiffres,
 * une suite de lettres,
 * des morceaux de mots séparés par des lettres ou chiffres, comme dans txt2regex ,
 * des morceaux de mots à l’intérieur d’un nomComposé utilisant camelCase.

Les séparations entre les mots, expressions, paramètres et valeurs de paramètres peuvent inclure de nombreux types d’espaces et de « caractères gris ». Les « caractères gris » sont les caractères non-alphanumériques ~!@#$%^&*_+-={}|[]\:";'<>?,./ . Un mélange entre caractères gris et espaces donne « espaces gris », qui sont traités comme des grosses séparation entre les mots. L’espace gris correspond à la manière dont sont réalisés les index et les recherches sont interprétés.

On note deux exceptions : Pour le reste, les caractères gris sont ignorés, à moins qu’en raison de la syntaxe de la requête, ils soient interprétés comme des modificateurs.
 * 1) un embedded:colon est un mot (il est traité comme une lettre),
 * 2) une virgule intégrée, comme dans 1,2,3, est traitée comme un nombre.

Les modificateurs sont ~ * \? - " ! . Selon leur position dans la syntaxe, ils peuvent s’appliquer à un terme, à un paramètre ou à une requête entière. Les modificateurs de mots et d’expressions sont le métacaractère, la proximité et la recherche floue. Chaque paramètre peut avoir son propre modificateur, mais en général :
 * Une recherche de mot flou ou d’expression floue intègre la tilde  en suffixe (et un nombre indiquant le degré).
 * Une tilde  préfixe une requête pour forcer la recherche en empêchant toute redirection potentielle.
 * Un métacaractère à l’intérieur d’un mot est un point d’interrogation (échappé) \? pour un seul caractère, ou bien une astérisque * pour plusieurs caractères.
 * L’algèbre de Boole permet d’interpréter AND et OR mais pas dans les paramètres.
 * L’algèbre de Boole permet d’interpréter les préfixes - ou ! à un terme pour inverser la signification du terme : passer de « contient » à « exclure ».
 * Les guillemets droits autour de plusieurs mots expriment la recherche d’une "expression exacte". Dans les paramètres, ils sont aussi utilisés pour délimiter les valeurs de plusieurs mots.
 * La recherche du radical est automatique mais peut être outrepassée en utilisant une "expression exacte".

Une recherche d’expression peut être entrée de diverses manières. Chaque méthode d’écriture a des conséquences sur le niveau de tolérance de la correspondance entre la séquences de mots et les résultats. Pour les recherches de greyspvce, camelCase ou txt2number : A "search instead" report is triggered when a universally unknown word is ignored in a phrase.
 * si « words-joined_by_greyspace(characters) » ou « wordsJoinedByCamelCaseCharacters » sont entrés, words joined by, [...], characters seront recherchés séparément ou assemblés.
 * « txt2number » retournera des résultats pour  et pour.
 * Les mots d’arrêt sont activés pour les mots aux extrémités d’une expression en espaces_gris ou en camelCase. Par exemple, en utilisant « the », « of » et « a » dans « the_invisible_hand_of_a », on obtient les résultats pour.

Each one of the following types of phrase-matching contains and widens the match-tolerances of the previous one: A word search will "additionally" find the words anywhere on the page.
 * An "exact phrase" "in quotes" will tolerate (match with) greyspace. Given "exact_phrase" or "exact phrase" it matches.
 * A greyspace_phrase initiates stemming and stop word checks.
 * Given CamelCase it will additionally match, in all lowercase. CirrusSearch is case insensitive.

Some parameters interpret greyspace phrases, but other parameters, like insource only interpret the usual "phrase in quotes".

Note that all stemming is case insensitive.

Note how the "exact phrase" search interpreted the embedded:colon character as a letter, but not the embedded_underscore character. A similar event occurs with the comma, character inside a number.

Given, CirrusSearch, when in an "exact phrase" context, (which includes the insource parameter context), will not match  ,  , or  , but will then only match.

Otherwise, remember that for CirrusSearch words are letters, numbers, or a combination of the two, and case does not matter.

The common word search employs the space character and is aggressive with stemming, and when the same words are joined by greyspace characters or camelCase they are aggressive with phrases and subwords.

When common words like "of" or "the" are included in a greyspace-phrase, they are ignored, so as to match more aggressively.

A greyspace_phrase search term, or a camelCase, or a txt2number term, match the signified words interchangeably. You can use any of those three forms. Now camelcase matches camelCase because Search is not case sensitive, but camelCase matches camelcase because camelCase is more aggressive. Like the rest of Search, subword "words" are not case-sensitive. By comparison the "exact phrase" is greyspace oriented and ignores numeric or letter-case transitions, and stemming. "Quoted phrases" are not case sensitive.

From the table we can surmise that the basic search parser_function -"parser function" is the sum of the basic searches  and.

Making inquiries with numbers, we would find that: The star * wildcard matches a string of letters and digits within a rendered word, but never the beginning character. One or more characters, a percentage of the word, must precede the * character. The \? wildcard represents one letter or number; The *\? is also accepted, but \?* is not recognized.
 * Plan9 or Plan_9 matches any of:,  ,  ,  ,
 * "plan9" only matches  (case insensitive)
 * Plan*9 matches  or.
 * If the leading part is only letters then it will limit a match to a string of (zero of more) letters.
 * If only numbers, then it will limit a match to a sequence of (zero or more) numbers, including also ordinal letters (st, nd, rd), capital letters, or time abbreviations (am or pm); and it will match the entirety of (both sides of) a decimal numbers.
 * Otherwise the comma is considered part of one number, but the decimal point is considered a greyspace character, and will delimit two numbers.
 * Inside an "exact phrase" it matches stemming plus compounding.

The wildcards are for basic word, phrase, and insource searches, and may also be an alternative to (some) advanced regex searches (covered later).

Putting a tilde ~ character after a word or phrase activates a fuzzy search.
 * For a phrase it is termed a proximity search, because proximal words are tolerated to an approximate rather than exact phrase.
 * For example, "exact one two phrase"~2 matches.
 * For a word it means extra characters or changed characters.
 * For a phrase a fuzzy search requires a whole number telling it how many extra words to fit in, but for a word a fuzzy search can have a decimal fraction, defaulting to word~0.5 ( word~.5 ), where at most two letters can be found swapped, changed, or added, but never the first two letters.
 * For a proximity phrase, a large number can be used, but that is an "expensive" (slow) search.
 * For a word word~.1 is most fuzzy, and word~.9 is least fuzzy, and word~1 is not fuzzy at all.

For the closeness value necessary to match in reverse (right to left) order, count and discard all the extra words, then add twice the total count of remaining words minus one. (In other words, add twice the number of segments). For the full proximity algorithm, see Elasticsearch slop. An explicit AND is required between two phrases because otherwise the two "inner" "quotation marks" are confused. Quotes turn off stemming, "but appending"~ the tilde reactivates the stemming.

Insource
Insource searches can be used to find any one word rendered on a page, but it's made for finding any phrase you might find - including MediaWiki markup. This phrase completely ignores greyspace: insource: "state state autocollapse" matches. Insource complements itself. On the one hand it has full text search for any word in the wikitext, instantly. On the other hand it can process a regexp search for any string of characters. Regex scan all the textual characters in a given list of pages; they don't have a word index to speed things up, and the process is interrupted if it must run more than twenty seconds. Regex run last, so to limit needless character-level scanning, you advance it a list of pages (a search domain) selected by an indexed search added to the query as a "clause", and you do this to every single regex query. . Insource can play both roles, and the best candidate for insource:/arg/ is often insource: arg, where arg is the same.

The syntax for the regexp is insource: no space, and then /regexp/. (No other parameter disallows a space. All the parameters except insource:/regexp/ generously accept space after their colon. )

Insource indexed-search and regexp-search roles are similar in many respects: But indexed searches all ignore greyspace; wildcards searches do not match greyspace, so regex are the only way to find an exact string of any characters, for example a sequence of two spaces. Regex are an entirely different class of search tool that make matching a literal string in a regexp exact string search, a basic, easy search. Advanced regex are an entirely different endeavor than matching a literal string. See below.
 * Both search wikitext only.
 * Neither finds things "sourced" by a transclusion.
 * Neither does stemmed, fuzzy, or proximity searches.
 * Both want the fewest results, and both work faster when accompanied by another clause.

Prefix and namespace
One namespace can be specified at the beginning of a search. Two or more namespaces may be set from the search results page, Special:Search, in the Advanced pane of the search bar. Furthermore, this search domain "profile" can be set and remembered as a user preference there. Setting a namespace in the search box overrides all search bar settings or indications. Entrez un espace de noms, entrez, ou bien entrez un deux-points    pour l’espace de noms principal. Les alias des espaces de noms sont acceptés. When the the file namespace, is involved a namespace modifier  has an effect, otherwise it is ignored. You can now use an interwiki prefix as a namespace to search other projects. The prefix: syntax in its current form is relied upon for a great deal of functionality so it's been recreated as exactly as possible.

Notez que les anciennes règles consistant à mettre prefix: à la fin de la requête s'appliquent encore.

Prefix and namespace are used to set the initial search domain, but each is also a query. Like prefix, namespace can run alone, and it will return the the top twenty pages, and show the number of total pages.

Filters
Filters are required to accompany a bare regex search. Any word or phrase is a filter because a filter returns a Y/N for every page in its given search domain. The filters can run as a standalone, a filter is also a query.

Intitle and incategory
Word and phrase searches match in a title and match in the category box on bottom of the page. But with these parameters you can select titles only or category only.

Intitle and incategory are old search parameters. Incategory no longer searches any subcategory automatically, but you can now add multiple category pagenames manually. To get the search parameter [//wikitech.wikimedia.org/wiki/Nova_Resource:Catgraph/Deepcat deepcat], to automatically add up to 70 subcategories onto an incategory parameter, incategory:category1|category2|...|category70 , you can add a line to your user-customized javascript.
 * cow*
 * Find articles whose title or text contains words that start with cow
 * intitle:foo
 * Find articles whose title contains foo. Stemming is enabled for foo.
 * intitle:"fine line"
 * Find articles whose title contains fine line. Stemming is disabled.
 * intitle:foo bar
 * Find articles whose title contains foo and whose title or text contains bar.
 * -intitle:foo bar
 * Find articles whose title does not contain foo and whose title or text contains bar.
 * incategory:Music
 * Find articles that are in Category:Music
 * incategory:"music history"
 * Find articles that are in Category:Music_history
 * incategory:"musicals" incategory:"1920"
 * Find articles that are in both Category:Musicals and Category:1920
 * -incategory:"musicals" incategory:"1920"
 * Find articles that are not in Category:Musicals but are in Category:1920

Linksto
Linksto finds wikilinks to a given name, not links to content. The input is the canonical, case sensitive, page name. It must match the title line of the content page, exactly, before any title modifications of the letter-case. (It must match its { {FULLPAGENAME}}, e.g. .)

Linksto does not find redirects. It only finds [ [wikilinks]], not internal URL links. It does find wikilinks made by a template.

To find all wikilinks to a "Help:Cirrus Search", if "Help:Searching" and "H:S" are redirects to it:


 * 1) linksto: "Help:Cirrus Search"
 * 2) linksto: Help:Searching
 * 3) linksto: H:S

finds articles that mention "CirrusSearch" but not in a wikilink.

Hastemplate
You can specify template usage with. Input the canonical pagename to find all usage of the template, but use any of its redirect pagenames finds just that naming. Namespace aliases are accepted, capitalization is entirely ignored, and redirects are found, all in one name-search. The namespace defaults to Template. (Compare boost-template no default namespace; linksto no namespace aliases, case-sensitive, no redirects; intitle no redirects.)

Hastemplate finds secondary (or meta-template) usage on a page: it searches the post-expansion inclusion. This is the same philosophy as for words and phrases from a template, but here it's for templates from a template. The page will be listed as having that content even though that content is not seen in the wikitext.


 * hastemplate: "quality image", finds "Template:Quality image" usage in your default search domain (namespaces).
 * : hastemplate: portal:contents/tocnavbar, finds mainspace usage of a "Contents/TOCnavbar" template in the Portal namespace.

Page weighting
Weighting determines snippet, suggestions, and page relevance. The normal weight is one. Additional weighting is given through multipliers.

If the query is just words, pages that match them in order are given a boost. If you add any explicit phrases to your search, or for certain other additions, this "prefer phrase" feature is not applied.

Morelike
The morelike: query works by choosing a set of words in the input articles and run a query with the chosen words. You can tune the way it works by adding the following parameters to the search results URL: These settings can be made persistent by overriding  in Special:MyLanguage/Help:System message.
 * morelike:page name 1|page name 2|...|page name n
 * Find articles whose text is most similar to the text of the given articles.
 * morelike:wasp|bee|ant
 * Trouve les articles concernant les insectes qui piquent (wasp/guêpe - bee/abeille - ant/fourmi).
 * morelike:template:search|template:regex|template:usage
 * Trouve les modèles à propos de la recherche par expressions régulières pour une utilisation sous forme de modèles sur un wiki.
 * cirrusMltMinDocFreq : Minimum number of documents (per shard) that need a term for it to be considered.
 * cirrusMltMaxDocFreq : Maximum number of documents (per shard) that have a term for it to be considered.
 * cirrusMltMaxQueryTerms : Maximum number of terms to be considered.
 * cirrusMltMinTermFreq : Minimum number of times the term appears in the input to doc to be considered. For small fields ( title ) this value should be 1.
 * cirrusMltMinWordLength : Minimal length of a term to be considered. Defaults to 0.
 * cirrusMltMaxWordLength : The maximum word length above which words will be ignored. Defaults to unbounded (0).
 * cirrusMltFields (comma separated list of values): These are the fields to use. Allowed fields are title, text , auxiliary_text , opening_text , headings and all.
 * cirrusMltUseFields ( | ): use only the field data. Defaults to : the system will extract the content of the   field to build the query.
 * cirrusMltPercentTermsToMatch : The percentage of terms to match on. Defaults to 0.3 (30 percent).
 * Example:

Prefer-recent
You can give recently edited articles a boost in the search results.
 * prefer-recent: anywhere in the query.
 * prefer-recent:recent,boost

prefer-recent: goes anywhere in the query. It defaults to 160 days as recent. If you're interested in the last week, use 7 instead. All articles older than seven days are boosted half as much, and all articles older than 14 days are boosted half as much again, and so on. The boost is more than the usual multiplier, it is exponential. The factor used in the exponent is the time since the last edit.

It takes a comma-separated pair of numbers defining "recent" and the boost. The default behavior for a bar adding "prefer-recent:" to the beginning of your search. By default this will scale 60% of the score exponentially with the time since the last edit, with a half life of 160 days. This can be modified like this: prefer-recent:proportion_of_score_to_scale,half_life_in_days


 * Proportion_of_score_to_scale must be a number between 0 and 1 inclusive.
 * Half_life_in_days must be greater than 0 but allows decimal points.

The Half_life_in_days number works well if very small. I've tested it around .0001, which is 8.64 seconds.

Ce sera activé par défaut sur Wikinews, mais il n'y a pas de raison à ce que vous ne puissiez pas l'utiliser dans vos recherches.

Boost-templates
You can boost pages' scores based on what templates they contain. This can be done directly in the search via  or you can set the default for all searches via the new   message. replaces the contents of  if the former is specified. The syntax is a bit funky but was chosen for simplicity. Some examples:


 * File:boost-templates:"Template:Quality Image|200%" incategory:china
 * Find files in the China category sorting quality images first.


 * File:boost-templates:"Template:Quality Image|200% Template:Low Quality|50%" incategory:china
 * Find files in the China category sorting quality images first and low quality images last.


 * File:boost-templates:"Template:Quality Image|200% Template:Low Quality|50%" popcorn
 * Find files about popcorn sorting quality images first and low quality images last. Remember that through the use of the  message this can be reduced to just.

N'essayez pas d'ajouter des valeurs décimales aux pourcentages. Cela ne fonctionnera pas et de toute façon la façon d'attribuer des scores aux images est conçu de telle manière à ce que cela n'ait que peut d'importance.

A word of warning about : if you add really really big or small percentages they can poison the full text scoring. Think, for example, if enwiki boosted featured articles by a million percent. Then searches for terms mentioned in featured articles would find the featured articles before exact title matches of the terms. Phrase matching would be similarly blown away so a search like w:Brave New World would find a featured article with those words scattered throughout it instead of the article for Brave New World.

Regular expression searches
A basic indexed-search finds words rendered visible on a page. Hyphenation and punctuation marks and bracketing, slash and other math and computing symbols, are merely boundaries for the words. It is not possible to include them in an indexed search.

These return much much faster when you limit the regexp search-domain to the results of one or more index-based searches.

Warning: Do not run a bare insource:/regexp/ search. It will probably timeout after 20 seconds anyway, while blocking responsible users.

An "exact string" regexp search is a basic search; it will simply "quote" the entire regexp, or "backslash-escape" all non-alphanumeric characters in the string. All regexp searches also require that the user develop a simple filter to generate the search domain for the regex engine to search:
 * insource:"debian.reproducible.net" insource: / debian\.reproducible\.net / 
 * insource:"c:\program files (x86)" insource: / C\:\\Program Files \(x86\) /i 
 * insource:"{ {template}}" insource: / "{ {template}}<\/tag>" /
 * insource:"[ [title|link label]]'s" insource: / "[ [title|link label]]'s" /
 * insource: / regexp / prefix:{ {FULLPAGENAME}}

The last example works from a link on a page, but { {FULLPAGENAME}} doesn't function in the search box.

For example: ' [[Special:Search/insource:/regex/ prefix:| finds the term regex'' on this page ]].

Any search with no namespace specified (or prefix specified) searches your default search domain, settable on any search-results page, i.e. settable at Special:Search. The default search domain is commonly reset by power users to All namespaces, i.e. the entire wiki, but if this occurs for a bare regexp search, then on a large wiki it will probably incur an HTML timeout before completing the search.

A regex search actually scours each page in the search domain character-by character. By contrast, an indexed search actually queries a few records from a database separately maintained from the wiki database, and provides nearly instant results. So when using using an insource:// (a regexp of any kind), consider creating one the other search terms that will limit the regex search domain as much as possible. There are many search terms that use an index and so instantly provide a more refined search domain for the /regexp/. In order of general effectiveness: The prefix operator is especially useful with a { {FULLPAGENAME}} in a search template, a search link, or an input box, because it automatically searches any subdirectories. To develop a new regexp, or refine a complex regexp, use  on a page with a sample of the target data.
 * insource:"" with quotation marks, duplicating the regexp except without the slashes or escape characters, is ideal.
 * intitle, incategory, and linksto are excellent filters.
 * hastemplate: is a very good filter.
 * "word1 word2 word3", with or without the quotation marks, are good.
 * namespace: is practically useless, but may enable a slow regexp search to complete.

Search terms that do not increase the efficiency of a regexp search are the page-scoring operators: morelike, boost-template, and prefer-recent.

Metacharacters
This section covers how to escape metacharacters used in rexexp searches For the actual meaning of the metacharacters see the explanation of the syntax.

For example: Refining with an exact string. You can start out intending an exact string search, but keep in mind: There are two ways to escape metacharacters. They are both useful at times, and sometimes concatenated side-by-side in the escaping of a string. Double-quotes escaping using insource:/"regexp"/ is an easy way to search for many kinds of strings, but you can't backslash-escape anything inside a double-quoted escape. Backslash-escape using insource:/regexp/ allows escaping the " and / delimiters, but requires taking into account metacharacters, and escaping any: The simplest algorithm to create the basic string-finding expression using insource:/"regexp"/, need not take metacharacters into account except for the " and / characters:
 * to search a namespace, gauge the number of pages with a single term that is a namespace. This will list the number of pages in that namespace.
 * starting out to find again what you may have seen, like "wiki-link" or "(trans[in]clusion)" start with namespace and insource filters.
 * refinining an ongoing search process with what you want to see, like "2 + 2 = 4", or "site.org" This is ideally the best use of regex, because it adds it as a single regexp term while refining a search, the limited number of pages the regexp must crawl is can be seen.
 * regex only search the wikitext not the rendered text, so there are some differences around the markup, and even the number of space characters must match precisely.
 * You are obligated to supply an accompanying filter.
 * You must learn how to escape regex metacharacters.
 * Backslash-escape one of them \char. The insource:/regexp/ uses slashes to delimit the regexp. Giving /reg/exp/ is ambiguous, so you must write /reg\/exp/.
 * Put a string of them in double quotes "string". Because escaping a character can't hurt, you can escape any character along with any possible metacharacters in there. Escaping with quotes is cleaner.
 * You can't mix methods, but you can concatenate them.
 * instead of
 * is as good as
 * But  always.
 * And .  It finds the   literally, which is not the   you probably wanted.
 * To match a  delimiter character use.
 * To match a  delimiter character use.
 * The metacharacters would be.
 * The equivalent expression is.
 * 1) Write   out. (The /" delimiters "/ are not shown.)
 * 2) Replace   with   (previous double-quote: stop, concatenate, quote restart).
 * 3) Replace   with   (stop, concatenate, start).
 * 4) You get , showing concatenation of the two methods.

The square-bracket notation for creating your own character-class also escapes its metacharacters. To target a literal right square bracket in your character-class pattern, it must be backslash escaped, otherwise it can be interpreted as the closing delimiter of the character-class pattern definition. The first position of a character class will also escape the right square bracket. Inside the delimiting square brackets of a character class, the dash character also has special meaning (range) but it too can be included literally in the class the same way as the right square bracket can. For example both of these patterns target a character that is either a dash or a right square bracket or a dot:  or.

For general examples using metacharacters: There are some notable differences from standard regex metacharacters:
 * insource:"2+2=4" insource:/"2+2=4"/ matches "2 + 2 = 4", with zero spaces between the characters.
 * insource:"2 + 2 = 4" insource:/2 ?\+ ?2 ?= ?4\./ match with zero or one space in between. The equals = sign is not a metacharacter, but the plus + sign is.
 * insource:"[ [link|2\3?]]\" insource:/"[ [link|2\3?]]< "\/" tag>"/.
 * The dot . metacharacter stands for any character including a newline, so .* matches across lines.
 * The number # sign means something, and must be escaped.
 * The ^ and $ are not needed. Like "grep" (global per line, regular expression, print each line), each insource:// is a "global per document, regular expression, search-results-list each document" per document.
 * support a multi-digit numeric range like [0-9] does, but without regard to the number of character positions, or the range in each position, so <9-10> works, and even <1-111> works.

Advanced example
For example, using metacharacters to find the usage of a template called Val having, inside the template call, an unnamed parameter containing a possibly signed, three to four digit number, possibly surrounded by space characters, AND on the same page, inside a template Val call, a named argument having any allowable spaces around it, (it could be the same template call, or a separate one):

It is fast because it uses two filters so that every page the regexp crawls has the highest possible potential. Assuming your search domain is set to ALL, it searches the entire wiki, because it offers no namespace or prefix.

bounded
You can limit search to pages identified as being near some specified geographic coordinates. The coordinates can either be specified as a, pair, or by providing a page title from which to source the coordinates. A distance to limit the search to can be prepended if desired. Examples:


 * neartitle:"San Francisco"
 * neartitle:"100km,San Francisco"
 * nearcoord:37.77666667,-122.39
 * nearcoord:42km,37.77666667,-122.39

boosted
You can alternatively increase the score of pages within a specified geographic area. The syntax is the same as bounded search, but with boost- prepended to the keyword. This effectively doubles the score for pages within the search range, giving a better chance for nearby search results to be near the top.


 * boost-neartitle:"San Francisco"
 * boost-neartitle:"100km,San Francisco"
 * boost-nearcoord:37.77666667,-122.39
 * boost-nearcoord:42km,37.77666667,-122.39

File properties search
Since MediaWiki 1.28, CirrusSearch supports indexing and searching of properties of files in the  namespace. This includes:
 * file media type
 * MIME type
 * size
 * width & height
 * resolution
 * bit depth for files that support these

filetype
Searching for file type allows to retrieve files according to their classification, such as office documents, videos, raster images, vector images, etc. The following types currently exist:

This list may be extended in the future. See also  constants in.

The syntax of the search is: filetype:{type}. Example:

filetype:video - looks for all videos

The filetype search is not case-sensitive.

filemime
Matches file MIME type. The syntax is:

filemime:{MIMEtype} - look for files of this MIME type

The argument can be quoted to specify exact match. Without quotes, partial matches to components of MIME type will be accepted too.

Examples:

filemime:"image/png" - look for files with MIME type exactly

filemime:pdf - look for all PDF documents

The MIME type search is not case sensitive.

filesize
Search for file of given size, in kilobytes (kilobyte means 1024 bytes). The syntax is:

filesize:{number} or filesize:>{number} - file with size at least given number

filesize:<{number} - file with size no more than given number

filesize:{number},{number} - file with size between given numbers

Examples:

filesize:>20 or filesize:20 - files 20KB and bigger

filesize:<1024 - files smaller than 1MB

filesize:100,500 - files with sizes between 100KB and 500KB

File measures
It is possible to search for specific file measures: width, height and resolution, which is defined as square root of height, width, and bit depth. Not all files may have these properties. The syntax is:

{measure}:{number} - file with measure that equals to given number

{measure}:>{number} - file with measure that is at least given number

{measure}:<{number} - file with measure that is no more than given number

{measure}:{number},{number} - file with measure that is between given numbers

Where  can be:

filew or filewidth - file width

fileh or fileheight - file height

fileres - file resolution (see above)

filebits - file bit depth

Examples:

filew:>800 fileh:>600 - files that are bigger than 800x600

filebits:16 - files with 16-bit color depth

fileheight:100,500 - file between 100 and 500 pixels high

Voir aussi

 * Completion Suggester - the incremental search feature of CirrusSearch
 * See Search/Old for more on the development and debut of of CirrusSearch.
 * See Help:Searching for MWSearch, used by the many wikis that don't have a search extension.
 * See Help:Searching for MWSearch, used by the many wikis that don't have a search extension.