Help:CirrusSearch

This page is a translated version of the page Help:CirrusSearch and the translation is 37% complete.
Outdated translations are marked like this.
PD Nota: Cuando editas esta página, aceptas liberar tu contribución bajo la licencia CC0. Para más información mira las páginas de ayuda de dominio público. PD

La manera más rápida de encontrar información en los proyectos de Wikimedia es buscarla directamente. En todas las páginas existe un cuadro de buscar.

CirrusSearch es una extensión de MediaWiki que utiliza Elasticsearch para proporcionar funciones mejoradas de búsqueda respecto de la búsqueda predeterminada de MediaWiki. La Fundación Wikimedia utiliza CirrusSearch para todos los proyectos de Wikimedia. Esta página describe las funcionalidades de CirrusSearch. Si la página no resulve tus dudas, siéntete libre de preguntar en la página de discusión y alguien te responderá.

Para más información, visitar sobre la extensión de MediaWiki, véase Extension:CirrusSearch .

Para su uso en Wikidata, véase Help:Extension:WikibaseCirrusSearch .

Funcionamiento

Introduce palabras clave o frases y pulsa la tecla Intro del teclado. O bien, haz clic en el icono de la lupa o el botón «Buscar» o «Ir».

Si el título de una página coincide exactamente con el texto escrito (o bien, si utilizas el botón «Ir»), se abrirá esa página directamente. Envío de caso contrarios, se buscan todas las páginas en el wiki (con algunas restricciones, véase más adelante), y se presenta una lista de los artículos que contienen la palabra (o las palabras) buscadas, o un mensaje que informa de que ninguna página tiene todas las palabras clave y frases.

Si haces clic en el botón “Buscar” sin escribir nada, irás a 'Especial:Buscar' en donde aparecerán opciones de búsqueda extras (también disponibles desde cualquier lista de resultado de búsqueda)

En determined casos puede ser muy útil restringir la búsqueda a determinadas páginas (como por ejemplo, las páginas de User namespace). Marca los espacios de nombres que necesites para esta búsqueda.

Todas las palabras clave mencionadas a continuación se distinguen entre mayúsculas y minúsculas.

Mejoras

CirrusSearch ofrece tres mejoras principales respecto a la herramienta predefinida de búsqueda de MediaWiki, a saber:

  • Mejor compatibilidad de búsquedas en idiomas diferentes.
  • Actualizaciones más rápidas al índice de búsquedas: así, las modificaciones en los artículos se reflejan en los resultados de las búsquedas más rápidamente.
  • Búsquedas en plantillas: el contenido de los artículos incrustados en plantillas ahora aparece en los resultados de las búsquedas.

¿Con qué frecuencia se actualiza el índice de búsqueda?

There are two primary search indexes to consider:

The first is full-text search, on Special:Search. This index is updated in near real time. Los cambios hechos en las páginas deberían aparecer inmediatamente en los resultados de las búsquedas. Los cambios realizados en plantillas deberían mostrarse en los artículos que incluyen esa plantilla en unos pocos minutos. Una edición "nula" del artículo (editar y guardar sin hacer cambio alguno) puede forzar que se muestren los cambios, pero si todo va bien, esto no debería ser necesario.

The second index to consider is the fuzzy auto-complete title search. This index is updated once a day and mirrors what was found in the full-text search index at the time the index was updated. Dependiendo del momento en que se haga una nueva página, podría tomar dos días encontrarla en el título autocompletado. If this is unacceptable for a particular use case, within user search options the title completion can be changed to classic prefix search which uses the full-text search index.

Sugerencias de búsqueda

Las sugerencias que se obtienen al escribir en el cuadro de búsqueda se ordenan mediante una medida aproximada de la calidad de cada artículo. En esta se toman en cuenta el número de enlaces entrantes, el tamaño de la página, la cantidad de enlaces externos, el número de títulos y el número de redirecciones.

Es posible ignorar las sugerencias de búsqueda y enviar las consultas directamente a la página de resultados de búsqueda. Basta con añadir una virgulilla ~ antes de la consulta. Por ejemplo, «~Frida Kahlo». Seguirán apareciendo sugerencias de búsqueda, pero al accionar la tecla Intro se navegará a la página de resultados de búsqueda.

El plegado de acentos/diacríticos está activado para algunos idiomas; los detalles son específicos para cada idioma.

The algorithm used to rank suggestions is described in more detail at Extension:CirrusSearch/CompletionSuggester#Ranking criteria.

Búsqueda de texto completo

Una "búsqueda de texto completo" es una "búsqueda indizada". Todas las páginas están almacenadas en el wiki base de datos, y todas las palabras en ellos están almacenadas en la base de datos de búsqueda, el cual es un índice al texto lleno del wiki. Cada palabra visible es indexed a la lista de páginas donde está encontrado, así que un buscar una palabra es tan rápidamente tan mirando arriba de un solo-récord.[1] Además, para cualesquier cambios en la formulación, el índice de búsqueda se actualiza en unos segundos.

Hay muchos índices del "texto completo" de la wiki para facilitar los muchos tipos de búsqueda necesarios. El wikitexto completo se indexa muchas veces en muchos índices de propósito especial, cada uno de los cuales analiza el wikitexto de la manera que optimice su uso. Algunos ejemplos de índices son:

  • Texto "auxiliar", incluye las notas de sombrero, los pies de foto, el TdC y cualquier wikitexto clasificado por un atributo HTML class=searchaux.
  • El texto "lead-in" es el wikitexto entre la parte superior de la página y el primer título.
  • El texto "categoría" indexa los listados en la parte inferior.
  • Las plantillas están indexadas. Si las palabras transcluidas de una plantilla cambian, se actualizan todas las páginas que la transcluyen. (Esto puede llevar mucho tiempo dependiendo de la cola de trabajo.) Si las subplantillas utilizadas por una plantilla cambian, el índice se actualiza.
  • El contenido de los documentos almacenados en el espacio de nombres Archivo/Medios se indexa ahora. Se reconocen miles de formatos.

Hay soporte para docenas de idiomas, pero se buscan todos los idiomas. Hay una lista de actualmente lenguas soportadas en elasticsearch.org; ver su documentación encima contribuyendo para entregar peticiones o remiendos. También se utilizan bibliotecas de código abierto de terceros para dar soporte a otros idiomas no cubiertos por Elasticsearch.

CirrusSearch optimizará su consulta y la ejecutará. Los títulos resultantes se ponderan en función de su relevancia y se procesan en gran medida, de 20 en 20, para la página de resultados de la búsqueda. Por ejemplo, se obtienen fragmentos del artículo y los términos de búsqueda se resaltan en negrita.

Los resultados de la búsqueda suelen ir acompañados de varios informes preliminares. Estos incluyen Quiso decir (corrección ortográfica), y, cuando no se encontrarían resultados de otra manera, dirá Mostrando resultados para (corrección de la consulta) y buscar en lugar de (su consulta).

Entre las prestaciones de la búsqueda se incluyen además:

  • Ordenar las sugerencias de navegación por el número de enlaces entrantes.
  • Empezar con el carácter de tilde ~ para desactivar la navegación y las sugerencias de forma que también se preserve el ranking de la página.
  • Caracteres de coincidencia inteligente normalizando (o "doblando") los caracteres que no son del teclado en caracteres del teclado.
  • Las palabras y frases que coinciden se resaltan en negrita en la página de resultados de la búsqueda. El resaltador es un analizador cosmético, mientras que el analizador de búsqueda-indización realmente encuentra la página, y estos pueden no estar 100% sincronizados, especialmente para regex. El resaltador puede coincidir con más o menos precisión que el indexador.

Palabras, frases y modificadores

El término básico de búsqueda es una palabra o una "frase entre comillas". Los detalles varían según el idioma, especialmente para los idiomas sin espacios, pero la búsqueda suele reconocer que una "palabra" es:

  • una cadena de dígitos
  • una cadena de letras
  • subpalabras entre transiciones de letras/dígitos, como en txt2regex
  • subpalabras dentro de un nombre compuesto usando camelCase

Una "palabra tope" es una palabra que se ignora (porque es común, o por otras razones). La lista de palabras reservadas es específica de cada idioma y no todos los idiomas admiten palabras reservadas.[2] Un término de búsqueda determinado coincide con el contenido (representado en la página). Para comparar con el wikitexto, utilice el parámetro de búsqueda insource (Ver sección más abajo). Cada parámetro de búsqueda tiene su propio índice, e interpreta el término dado de su propia manera.[3]

El espacio entre las palabras, las frases, los parámetros y la entrada a los parámetros, puede incluir generosas instancias de espacios en blanco y caracteres de espacio gris. "Los caracteres del espacio gris" son todos los caracteres no alfanuméricos $caracteres. Una cadena mixta de caracteres de espacio gris y caracteres de espacio en blanco, es "espacio gris", y se trata como un gran límite de palabra. El espacio gris es la forma en que se hacen los índices y se interpretan las consultas.[4]

Hay dos excepciones: 1) un incorporado:dos puntos es una palabra (se trata como una letra), y 2) una coma incrustada , como en 1,2,3, se trata como un número. Por lo demás, los caracteres de espacio gris se ignoran a menos que, debido a la sintaxis de la consulta, puedan interpretarse como caracteres modificadores.

Los modificadores son ~ * \? - " ! . Dependiendo de su ubicación en la sintaxis pueden aplicarse a un término, a un parámetro o a una consulta completa. Los modificadores de palabras y frases son el comodín, la proximidad y las búsquedas difusas. Cada parámetro puede tener sus propios modificadores, pero en general:

  • Una búsqueda de palabras difusas o frases difusas puede llevar un carácter de tilde ~ (y un número que indique el grado).
  • Un carácter de tilde ~ antepuesto al primer término de una consulta garantiza los resultados de la búsqueda en lugar de una posible navegación.
  • Un carácter comodín dentro de una palabra puede ser un signo de interrogación (escapado) \N para un carácter o un carácter asterisco \N para cero o más caracteres.
  • La lógica de la verdad puede interpretar AND y OR, pero los parámetros no. Tenga en cuenta que los operadores AND y OR actualmente ¡no funcionan de la manera tradicional de la lógica de la verdad! Para más detalles, ver más en Operadores lógicos.
  • La lógica de la verdad entiende que el prefijo - o ! a un término invierte el significado habitual del término de "coincidencia" a "exclusión".
Las palabras que empiezan por - o !, como -in-law o !Kung, pueden coincidir exactamente con los títulos y las redirecciones, pero también coincidirán con todos los documentos que no contengan la palabra negada, que suelen ser casi todos los documentos. Para buscar estos términos que no sean coincidencias exactas de títulos o redirecciones, utilice el parámetro de búsqueda insource (Ver sección más abajo).
  • Las comillas alrededor de las palabras marcan una búsqueda de "frase exacta". En el caso de los parámetros, también son necesarias para delimitar la entrada de varias palabras.
  • El stemming es automático, pero puede desactivarse mediante una "frase exacta".
Los dos caracteres comodín son la estrella y el signo de interrogación (escapado), y ambos pueden ir en medio o al final de una palabra. El signo de interrogación \?, que se ha escapado, representa un carácter y la estrella * representa cualquier número de caracteres. Debido a que muchos usuarios, en lugar de escribir una consulta, harán una pregunta, cualquier signo de interrogación se ignora a menos que se escape a propósito \? en su significado de comodín.

La búsqueda de una frase puede iniciarse mediante varias pistas al motor de búsqueda. Cada método de sugerencia tiene un efecto secundario en cuanto a la tolerancia de la coincidencia de la secuencia de palabras. Para las pistas greyspace, camelCase, o txt2number:

  • dado words-joined_by_greyspace(characters) o wordsJoinedByCamelCaseCharacters encuentra words joined by ... characters, en sus formas desnudas o formas de espacio gris.
  • txt2number coincidirá con txt 2 number o txt-2.number.
  • Las palabras de parada se habilitan para los casos de borde (en la periferia) de una frase grey_space o camelCase. Un ejemplo utilizando the, of y a es que the_invisible_hand_of_a coincide con invisible hand dentro del texto meetings invisible hand shake.

El informe "buscar en lugar de" se activa cuando se ignora una palabra universalmente desconocida en una frase.

Cada uno de los siguientes tipos de concordancia de frases contiene y amplía las tolerancias de concordancia del anterior:

  • Una "frase exacta" "entre comillas" tolerará (coincidirá con) el espacio gris. Dado $frase_exacta o $frase_exacta coincide con $corchete_exacto.
  • Una frase de espacio gris inicia la comprobación de la raíz y de la "palabra de parada".
  • Dado CamelCase coincidirá adicionalmente con camelcase, en todas las minúsculas, porque CirrusSearch no distingue entre mayúsculas y minúsculas en la búsqueda. Tenga en cuenta que la coincidencia de CamelCase no está habilitada para todos los idiomas.

Algunos parámetros comprenden frases greyspace (frases que poseen carácteres no-alfanuméricos), pero otros parámetros, como insource (fuente de información) sólo interpretan la usual "frase entre comillas".

En la terminología de búsqueda, el soporte de "stemming" significa que una búsqueda de "nadar" incluirá también "nadando" y "nadado", pero no podrá incluir formas irregulares como "nadó".
Frase de búsqueda parserfunction parserFunction parser function parser-function parser:function parSer:funcTion
parserfunction      N  N  N  N
"parser function"  N  N      N  N
parser_function  N        N  N
parserFunction          N  N
"parser:function"  N  N  N  N    
"parser_function"  N  N      N  N
"parSer_funcTion"  N  N      N  N
parSer_FuncTion  N  N        

Tenga en cuenta que todas las derivaciones no distinguen entre mayúsculas y minúsculas.

Note como la búsqueda de la "frase exacta" interpretó el carácter incrustado:dos puntos como una letra, pero no el caracter incrustado_guion bajo. Un similar acontecimiento ocurre con el caracter , entre números.

Dado in:this:word, CirrusSearch, cuando está en un contexto de "frase exacta", (que incluye el contexto del parámetro insource), no coincidirá con in, this, o word, sino que entonces sólo coincidirá con in:this:word.

Por lo demás, recuerda que para CirrusSearch las palabras son letras, números o una combinación de ambos, y las mayúsculas y minúsculas no importan.

La búsqueda de palabras comunes emplea el carácter espacio y es agresiva con el stemming, y cuando las mismas palabras están unidas por caracteres greyspace o camelCase son agresivas con las frases y subpalabras.

Cuando se incluyen palabras comunes como "de" o "el" en una frase de espacio gris, se ignoran, para que la coincidencia sea más agresiva.

Un término de búsqueda greyspace_phrase, o un camelCase, o un término txt2number, coinciden indistintamente con las palabras significadas. Puede utilizar cualquiera de estas tres formas.[5] Ahora camelcase coincide con camelCase porque la búsqueda no distingue entre mayúsculas y minúsculas, pero camelCase coincide con camelcase porque camelCase es más agresivo. Al igual que el resto de la Búsqueda, las "palabras" de subpalabras no distinguen entre mayúsculas y minúsculas. En comparación, la "frase exacta" se orienta hacia el espacio gris e ignora las transiciones numéricas o de letras, así como el stemming. Las "frases citadas" no distinguen entre mayúsculas y minúsculas.

A partir de la tabla, podemos suponer que la búsqueda básica parser_function -"parser function" es la suma de las búsquedas básicas parserFunction y parser<stems> function<stems>.

Haciendo consultas con números, encontramos lo siguiente:

  • Plan9 o Plan_9 coincidencias de: plan9, plans 9, planned 9th, (planned) 9.2, "plans" (9:24).
  • Plan92 una única coincidencia plan9 (insensible a las mayúsculas).
  • Plan*9 coincidencias plan9 o planet4589.

El comodín estrella * coincide con una cadena de letras y dígitos dentro de una palabra renderizada, pero nunca el caracter de inicio. Uno o mas carácteres, un porcentaje de la palabra, debe preceder del caracter *.

  • Cuando * coincide con números, una coma se considera parte de un número, pero el punto decimal se considera un carácter de espacio gris y delimitará dos números.
  • Dentro de una "frase exacta" * es tratado como un carácter de espacio gris y no como un carácter comodín, por lo que delimita las palabras.

El comodín \? representa una letra o número; tambien es aceptado el *\?, pero \?* no es reconocido.

Los comodines sirven para realizar búsquedas básicas de palabras, frases y fuentes, y también pueden ser una alternativa a (algunas) búsquedas regex avanzadas (tratadas más adelante).

Poner una tilde ~ después de una palabra o frase activa una búsqueda difusa.

  • Para una frase se denomina búsqueda de proximidad, porque se toleran palabras próximas a una frase aproximada y no exacta.
  • Por ejemplo, "exact one two phrase"~2 coincide con exact phrase.
  • Para una palabra significa caracteres extra o caracteres cambiados.
  • Para una frase una búsqueda difusa requiere un número entero que le diga cuántas palabras extra debe incluir, pero para una palabra una búsqueda difusa puede tener una fracción decimal, por defecto a $palabra05 ($palabratilde), donde como máximo se pueden encontrar dos letras intercambiadas, cambiadas o añadidas, pero nunca las dos primeras.
  • Para una frase de proximidad, se puede usar un número grande, pero eso es una búsqueda «cara» (lenta).
  • Para una palabra word~2 es la más difusa con una distancia de edición de 2 (por defecto), y word~1 es la menos difusa, y word~0 no es difusa en absoluto.
flowers algernon Flowers for Algernon flowers are for Algernon Flowers a1 2b 3c 4f 5j 6l 7j 8p q9 z10 for Algernon
"flowers algernon"    N  N  N
"flowers algernon"~0    N  N  N
"flowers algernon"~1      N  N
"flowers algernon"~2        N
"flowers algernon"~11        
"algernon flowers"~1  N  N  N  N
"algernon flowers"~2    N  N  N
"algernon flowers"~3      N  N
"algernon flowers"~4        N
"algernon flowers"~13        

Para obtener el valor de proximidad necesario para coincidir en orden inverso (de derecha a izquierda), cuente y descarte todas las palabras sobrantes, y luego sume el doble del recuento total de palabras restantes menos una. (En otras palabras, añade el doble de segmentos). Para el algoritmo de proximidad completo, véase Elasticsearch slop.

Las citas desactivan el stemming, "but appending"~ la tilde reactiva el stemming.

flowers flower Flowers for Algernon flower for Algernon
flowers         El stemming es un efecto.
"flowers"    N    N La búsqueda de proximidad desactiva el stemming.
"flowers"~         Proximidad más stemming (frase citada) por sufijo de una tilde.
"flowers for algernon"  N  N    N La búsqueda de proximidad desactiva el stemming.
"flowers for algernon"~  N  N     Proximidad más stemming(frase citada) por sufijo de una tilde.
"flowers algernon"~1  N  N    N Proximidad busca desactivar stemming.
"flowers algernon"~1~  N  N     Proximidad más stemming por sufijo de una tilde.

Búsqueda de wikitexto (insource)

1.24
Gerrit change 137733

Las búsquedas internas se pueden usar para encontrar cualquier palabra representada en una página, pero está hecha para encontrar cualquier frase que pueda encontrar, incluido marcado de MediaWiki (también conocido como wikicode), en cualquier página excepto en las redirecciones. Esta frase ignora completamente el espacio gris: insource: "state state autocollapse" coincide con |state={{{state|autocollapse}}}.

insource: word
insource: "word1 word2"
Los carácteres greyspace son ignorados, al igual que con búsquedas de palabras y frases exactas.
insource:/regexp/
insource:/regexp/i
Estos son expresiones regulares. No son eficientes, por lo que solo se permiten unos pocos a la vez en el clúster de búsqueda, pero son muy poderosos. La expresión regular coincide de forma predeterminada entre mayúsculas y minúsculas; la insensibilidad a mayúsculas y minúsculas se puede optar por el i adicional, que es incluso menos eficiente.

La fuente de información se complemente asimisma. Por una lado tiene búsqueda instantanea de texto completo para cualquier palabra en el wikitext. Por otro lado puede procesar búsquedas de expresiones regulares para cualquier cadena de carácteres.[6] Las expresiones regulares escanean todos los caracteres textuales en una lista determinada de páginas; no tienen un índice de palabras para acelerar las cosas y el proceso se interrumpe si se ejecuta durante más de veinte segundos. Las expresiones regulares se ejecutan en último lugar en una consulta, por lo que, para limitar el escaneo innecesario a nivel de caracteres, cada consulta de expresiones regulares debe incluir otros términos de búsqueda para limitar el número de documentos que deben ser escaneados.[7] A menudo el mejor candidato para añadir a la consulta regex insource:/arg/ es insource:arg, donde arg es el mismo (y no utiliza comodines).

La sintaxis para la regexp es insource: sin espacio, y luego /regexp/. (Ningún otro parámetro desestima un espacio. Todos los parámetros, excepto insource:/regexp/, aceptan un espacio después de los dos puntos).

Las funciones de búsqueda indexada y de búsqueda regexp son similares en muchos aspectos:

  • Ambos buscan sólo en el wikitexto.
  • Ninguno de los dos encuentra cosas "originadas" por una transclusión.
  • Ninguno de los dos hace búsquedas por tallo, difusas o de proximidad.
  • Ambos buscan el menor número de resultados, y ambos trabajan más rápido cuando van acompañados de otra cláusula.

Pero las búsquedas indexadas ignoran todos los espacios en gris; las búsquedas con comodines no coinciden con los espacios en gris, por lo que las expresiones regulares son la única forma de encontrar una cadena exacta de caracteres "cualquiera y todos", por ejemplo una secuencia de dos espacios. Las remezclas son una clase totalmente diferente de herramienta de búsqueda que facilita la búsqueda de una cadena literal (uso básico, para principiantes), y hace posible la búsqueda por expresiones de metacaracteres (uso avanzado) en la wiki. Ver #Regular expression searches más abajo.

El parámetro insource trata las palabras con dos puntos incrustados como una sola palabra. Esto afecta a las consultas de búsqueda de plantillas, funciones del analizador, URLs, wikilinks, etiquetas HTML y comentarios.
Cuando sea posible, evite ejecutar una búsqueda regexp desnuda. Vea cómo esto es siempre posible en #Regular expression searches, más abajo.
Para buscar palabras que empiecen por - o !, como -in-law o !Kung, utilice una consulta insource que no distinga entre mayúsculas y minúsculas junto con una búsqueda simple en la versión "simple" del término (para evitar una búsqueda regexp desnuda). Por ejemplo, "in-law" insource:/-in-law/i o "kung" insource:/!kung/i.

Prefijo y espacio de nombres

Prepending a namespace term like file: to a search query limits results to a specific namespace , instead of searching the entire wiki. The default namespace is "Main".

Solo se puede definir un espacio de nombres en la consulta del cuadro de búsqueda. Es el primero o el último término, ubicado dentro de un parámetro «prefix». It must be the first term in the query, or, if used as part of a prefix: term, must appear as the last term in the query.

Se pueden buscar dos o más espacios de nombres desde el panel Avanzado de la barra de búsqueda que se encuentra en la parte superior de cada página de resultados de búsqueda, Special:Search. Aquí se puede establecer su dominio de búsqueda, como un perfil de espacios de nombres. La lista de espacios de nombres se presentará entonces en la primera página de los futuros resultados de la búsqueda para indicar el dominio de búsqueda de los resultados. Para desactivar esto, seleccione el espacio de nombres por defecto (mostrado entre paréntesis), seleccione "Recordar" y pulse Buscar.

La barra de búsqueda establece e indica gráficamente un dominio de búsqueda. "Páginas de contenido" (espacio principal), "Multimedia" (Archivo), "Todo" (todo más Archivo), "Traducciones", etc., son hipervínculos que pueden activar la consulta en ese dominio, y lo indican pasando a inactivo (oscuro). Pero la consulta anulará la barra de búsqueda. Cuando se utiliza un espacio de nombres o un prefijo en la consulta, las activaciones e indicaciones de la barra de búsqueda pueden ser engañosas, por lo que la barra de búsqueda y el cuadro de búsqueda son formas mutuamente excluyentes (no complementarias) de establecer el dominio de búsqueda.

Un término de espacio de nombres anula la barra de búsqueda, y un término prefix: anula un espacio de nombres.

To specify a namespace name, prefix it with a colon, e.g., talk:. Use all: to search across all namespaces, or : (a single colon) to search just the main article namespace.

Todos no incluye el espacio de nombres Archivo. El archivo incluye el contenido multimedia que se encuentra en Commons, como el PDF, que está indexado y se puede buscar. Cuando se trata de File, el modificador de espacio de nombres local: tiene efecto, de lo contrario se ignora.

As with search parameters, local: and all: must be lowercase. Namespaces names, though, are case insensitive.

Se aceptan los alias de espacios de nombres .

talk: "Wind clock" Encuentra páginas en el espacio de nombres Talk cuyo título o texto contenga la frase "wind clock".
file: "Wind clock" Encuentra páginas en el espacio de nombres Archivo, cuyo título, texto o contenido multimedia contenga la frase "reloj de viento".
file: local: "Wind clock" Filtrar los resultados de Commons wiki.
local: "Wind clock" Ignorado. Busca en el espacio principal. Se ignora lo local a menos que se trate de un archivo.

prefix:

El parámetro prefix: coincide con cualquier número de primeros caracteres de todos los nombres de página de un espacio de nombres.[8] Cuando las primeras letras coinciden con un nombre de espacio de nombres y dos puntos, el dominio de búsqueda cambia.

Dado un espacio de nombres solamente, prefijo coincidirá con todos sus nombres de página. Dado un solo carácter, no puede ser - guión o ' comillas o " comillas dobles. El último carácter no puede ser dos puntos.

Para los nombres de página que coinciden, los títulos de sus subpáginas coinciden por definición.

El parámetro prefijo no permite un espacio antes de un espacio de nombre, pero permite espacios en blanco antes de un nombre de página. This term always goes at the end, so that pagename characters may contain quotation marks (").

prefix:cow Buscar páginas en mainspace cuyo título empiece por las tres letras c o w.
domestic   prefix:cow Busca páginas en mainspace cuyo título empiece por las tres letras c o w, y que contengan la palabra "domestic".
domestic   prefix:cow/ Enumera las subpáginas existentes de $vaca pero sólo si contienen la palabra "domestic". This is a very common search and is frequently built using a special URL parameter called prefix=.
domestic   prefix:Talk:cow/ List any subpages of Talk:cow, but only if they contain the word "domestic".
1967   prefix:Pink Floyd/ List any subpages of Pink Floyd, but only if it also contains the word "1967".

The Translate extension creates a sort of "language namespace" of translated versions of a page. However, unlike namespace or prefix, which create the initial search domain, the inlanguage parameter is a filter of it. (See the next section.)

Excluir contenido del índice de búsquedas

Content can be excluded from the search index by adding class="navigation-not-searchable". This will instruct CirrusSearch to ignore this content from the search index (see task T162905 for more context).

Additionally content can be marked as auxiliary information by adding class="searchaux". This will instruct CirrusSearch to move the content from the main text to an auxiliary field which has lower importance for search and snippet highlighting. This distinction is used for items such as image thumbnail descriptions, 'see also' sections, etc.

Filtros

A filter will have multiple instances, or negated instances, or it can run as a standalone filtering a search domain. A query is formed as terms that filter a search domain.

Adding another word, phrase, or parameter filters more. A highly refined search result may have very many Y/N filters when every page in the results will be addressed. (In this case ranking is largely irrelevant.) Filtering applies critically to adding a regex term; you want as few pages as possible before adding a regex (because it can never have a prepared index for its search).

A namespace is a specified search domain but not a filter because a namespace will not run standalone. A prefix will negate so it is a filter. The search parameters below are filters for which there may be multiple instances.

Insource (covered above) is also a filter, but insource:/regexp/ is not a filter. Filters and all other search parameters are lowercase. (Namespaces are an exception, being case insensitive.)

Intitle e 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.

  • 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

Intitle and incategory are old search parameters. Incategory no longer searches any subcategory automatically, but you can now add multiple category pagenames manually.

1.31
Gerrit change 413896

Since MediaWiki 1.31-wmf.23 Regular expression searches are supported for intitle:

intitle:/regex/, intitle:/regex/i

Everything written in the #Regular expression searches is also valid for these searches, including warnings.

When possible, please avoid running a bare regexp search. See how this is always possible at #Regular expression searches, below.

Deepcategory

Deep category search allows to search in category and all subcategories. The depth of the tree is limited by 5 levels currently (configurable) and the number of categories is limited by 256 (configurable). The deep search uses SPARQL Category service from WDQS. Keywords are deepcategory or deepcat. Example:

  • deepcat:"musicals"
    • Find articles that are in Category:Musicals or any of the subcategories.

The DeepCat gadget that previously implemented the parameter was sunsetted in January 2020.

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. Help:CirrusSearch/es.)

Linksto does not find redirects. It only finds [[wikilinks]], even when they are made by a template. It does not find a link made by a URL, even if that URL is an internal wiki link.

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

CirrusSearch -linksto: Help:CirrusSearch finds articles that mention "CirrusSearch" but not in a wikilink.

Hastemplate

You can specify template usage with hastemplate: template. 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. (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.

For installations with the Translate extension, hastemplate searches get interference wherever Template:Translatable template name wraps the template name of a translatable template. Use insource instead.

Inlanguage

For installations with the Translate extension, inlanguage is important for highly refined searches and page counts.

inlanguage: código de idioma

will produce search results in that language only.

Por ejemplo

  • to count all Japanese pages on the wiki
all: inlanguage: ja
  • to filter out German and Spanish pages in the Help namespace
help: -inlanguage: de -inlanguage: es
  • to ignore Translate, and where English is the base language, add
inlanguage:en

Contentmodel

The contentmodel: keyword allows to limit the search to pages of a specific content model. For possible models cf. Content handlers. E.g.:

  • Para ver únicamente páginas JSON:
contentmodel:json

subpageof

To find sub-pages.

subpageof: ParentPage

For example

  • To find all subpages of CirrusSearch.
subpageof:CirrusSearch
  • Use double quotes if the parent page contains spaces.
subpageof:"Requests for comment"
unlike prefix:, do not include the page namespace in the keyword value. If you want to limit to sub-pages of a particular namespace use the namespace filter.

Articletopic

The articletopic: keyword allows filtering search results by topic. For possible topics see Help:CirrusSearch/articletopic . E.g. articletopic:books will filter the search results to articles about books. articletopic:books|films will filter to articles about books or films. articletopic:books articletopic:films will filter to articles which are about both books and films.

Only mainspace articles belong into topics, and topics are only available on Wikipedias. Unlike other filters, articletopic also does page weighting: articles which are a stronger match for a topic will be higher in the search results (while articles which aren't about that subject at all will be removed from the result set completely).

Topic models are derived via machine learning from ORES. Any given article receives a score on dozens of different topics, and therefore may appear under different keywords. For instance, the article on Albert Einstein may appear as a "physics" article and a "biography" article. All Wikipedias have scores available -- some have local-language topic models that have coverage on all articles. Other languages do not have local ORES models, and are using English-language scores assigned to articles in the local language that also exist in English Wikipedia. The languages with such "cross-wiki" scores do not have 100% coverage -- depending on the language, it may only be something like 60% of articles that have topics available.

Topic-related search data is updated weekly, so recently created articles might not show up in topic-based search queries.

Pageid

The pageid: keyword restricts search results to the given set of page IDs. This is not really useful for manual searching; it can be used by software tools for checking whether a set of pages match the given set of search conditions (e.g. for re-validating cached search results).

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

  • 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
    • Find articles about stinging insects.
  • morelike:template:search|template:regex|template:usage
    • Find templates about regex searching for template usage on the wiki.

morelike is a "greedy" keyword, meaning that it cannot be combined with other search queries. If you want to use other search queries, use morelikethis in your search:

  • morelikethis:bee hastemplate:"featured article"
    • Find articles about bees that also have the "featured article" template.

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:

  • 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 (true|false): use only the field data. Defaults to false: the system will extract the content of the text field to build the query.
  • cirrusMltPercentTermsToMatch: The percentage of terms to match on. Defaults to 0.3 (30 percent).
  • Example:
    &cirrusMtlUseFields=yes&cirrusMltFields=title&cirrusMltMinTermFreq=1&cirrusMltMinDocFreq=1&cirrusMltMinWordLength=2
    

These settings can be made persistent by overriding cirrussearch-morelikethis-settings in System message.

Prefer-recent

Adding prefer-recent: anywhere in the query gives recently edited articles a slightly larger than normal boost in the page-ranking rules. Prefer-recent is only applied when using the default relevance sort order.

It defaults to boost only 60% of the score, in a large, 160-day window of time, which can be entered in the query as prefer-recent:0.6,160. This plays well with other page ranking rules, and is intended for most searches.

You can manipulate the rules: prefer-recent:boost,recent Technically, "boost" is the proportion of score to scale, and "recent" is the half life in days. The boost is more than the usual multiplier, it is an exponential boost. The factor used in the exponent is the time since the last edit.

For example

prefer-recent:,7

Pages older than 7 days are boosted half as much, and pages older than 14 days are boosted half as much again, and so on. For a simple "sort by date" in highly refined search results, where page ranking and boosting are largely meaningless, just boost the entire score.

  • prefer-recent:1,7 - weeks
  • prefer-recent:1,1 - days
  • prefer-recent:1,0.0007 - minutes
  • prefer-recent:1,0.0001 - 8.64 seconds
  • prefer-recent:1,0.00001 - seconds

Boost-templates

You can boost pages' scores based on what templates they contain. This can be applied to all search queries by declaring boosts via MediaWiki:Cirrussearch-boost-templates, or ad-hoc in individual queries via the boost-templates:"" operator. If the boost-templates operator is set in a query, then the contents of cirrussearch-boost-templates are ignored. Similar to the prefer-recent feature, boost-templates is applied as part of the default relevance sort order. It has no effect on other search orders.

The syntax of the message is as follows:

  • Everything from a # character to the end of the line is considered a comment, and ignored.
  • Every non-blank line is interpreted as the exact name of a template that should receive boosting (including namespace prefix), followed by a pipe "|" character, followed by a number, followed by a "%" character.

Good examples:

 Template:Important|150%
 Template:Very_Very_Important|300%
 Template:Less_important|50%

Bad examples:

 Template:Foo|150.234234% # decimal points are not allowed.
 Foo|150% # technically valid, but acts on transclusions of Foo (main space article) instead of Template:Foo.

Algunos ejemplos:

boost-templates:"Template:Quality_Image|200%" incategory:china
Find files in the China category, sorting quality images first.
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.
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 cirrussearch-boost-templates message this can be reduced to just popcorn.

Decimal points are not permitted in percentage values. Search scoring is such that fractions of a percent are unlikely to make a difference.

Beware that if you add very low or very high percentages via cirrussearch-boost-templates, they can poison the full-text scoring. For example, if Wikipedia were to boost the "Featured article" template by 1 million percent, then, searches for any term mentioned in featured articles, would rank the featured article above even the dedicated article about that term.

Phrase matching would be similarly blown away, so a search like brave new world would return a featured article as first result even if it merely has those three words mentioned throughout it, instead of the more relevant article about Brave New World itself.

Regular expression searches

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

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. Mostly that search behavior is wanted by the user. However, sometimes one wants to have the ability for a more precise search.

To get around the syntactic deficiency of index-based searches regexp searches can be used. But as queries with only regexp expressions are very slow and resource consuming, they should always be combined with an index-based search, such that the regexp search-domain gets limited to the results of one or more index-based search.

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 develops a simple filter to generate the search domain for the regex engine to search (index based search domain marked bold, regexp part marked in italics):

  • insource:"debian.reproducible.net" insource:/debian\.reproducible\.net/
  • insource:"c:\program files (x86)" insource:/C\:\\Program Files \(x86\)/i
  • insource:"<tag>{{template}}</tag>" insource:/"<tag>{{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:{{FULLPAGENAME}}]] finds the term regex on this page.

A query with no namespace specified and no prefix specified searches your default search domain, (settable on any search-results page, i.e. at Special:Search). Some users keep their default search domain at "all namespaces", i.e. the entire wiki. On a large wiki if this user does a bare regexp search it will probably fail, incurring a 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 an insource:// (a regexp of any kind), consider adding 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:

  • insource:"" with quotation marks, duplicating the regexp except without the slashes or escape characters, is ideal.
  • intitle (without regex search), 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.

To test a bare regexp query you can create a page with test patterns, and then use the prefix parameter with that fullpagename. The match will be highlighted. It searches that page (in the database) and its subpages.

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 regexp searches. For the actual meaning of the metacharacters see the explanation of the syntax.[9]

The use of an exact string requires a regexp, but the regexp term obligates the search to limit itself. Add a regexp term, never search a bare regexp. Start by noting the number of pages in a previous search before committing an exact string search. Querying with an exact string requires a filtered search domain.

For example:

  • 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.

There are some notable differences from standard regex metacharacters:

  • The \n or \r\n are not reserved for matching a newline.

To search for a string that contains a newline, you can do a search like insource:/[^\}]\}\}[^\} \|]{2}\<noinclude/i which means not a curly brace, then two curly braces, then any two characters except a curly brace, space, or pipe, then a ‎<noinclude> tag. The "any character except" will include a newline in the search. Note thas this search was designed only to match to the following string:

}}

<noinclude>
  • The dot . metacharacter stands for any character including a newline, so .* matches across lines.
  • The number # sign means something, and must be escaped.

[10]

  • The ^ and $ are not implemented. 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.
  • < and > 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.

Substitutions for some metacharacters

While character classes \n, \s, \S are not supported, in case of an acute need to use them in a regular expression, you may use these workarounds:

PCRE CirrusSearch Description
\n [^ -􏿿] A newline (also can find a tabulation character)
[^\n] [ -􏿿] Any character except for a newline (and tabulation; you can add it to character set to include it as well)
\s [^!-􏿿] A white space character: space, newline, or tabulation
\S [!-􏿿] Any character except for white space characters (not a space, not a newline, and not a tabulation)

In these ranges, " " (space) is used as the character immediately following control characters, "!" – the character immediately following it, and "􏿿" as the U+10FFFF character, which is the last character in Unicode. Thus, the range from " " to "􏿿" includes all characters except for control ones, of which articles may contain newlines and tabs, while the range from "!" to "􏿿" includes all characters except for control ones and the space.

Refining with an exact string

  • refining 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.

You can start out intending an exact string search, but keep in mind:

  • 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.

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.

  • 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.

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.

  • /"[[page/name|{{temp-late"/ instead of /\[\[page\/name\|\{\{temp\-late/
  • /"literal back\slash"/ is as good as /literal back\\slash/
  • But /"This \" fails"/ always.
  • And /"This \/ depends"/. It finds the \/ literally, which is not the / you probably wanted.

Backslash-escape using insource:/regexp/ allows escaping the " and / delimiters, but requires taking into account metacharacters, and escaping any:

  • To match a / delimiter character use \/.
  • To match a " delimiter character use \".
  • The escaped metacharacters would be \~\@\#\&\*\(\)\-\+\{\}\[\]\|\<\>\?\.\\.
  • The equivalent expression escaped with double-quotes is "~@#&*()-+{}[]|\<>?.\".

The simplest algorithm to create the basic string-finding expression using insource:/"regexp"/, need not take metacharacters into account except for the " and / characters:

  1. Write the/str"ing out. (The /" delimiters "/ are not shown.)
  1. Replace " with "\"" (previous double-quote: stop, concatenate, quote restart).
  1. Replace / with "\/" (stop, concatenate, start).
  1. You get insource:/"the"\/"str"\""ing"/, showing concatenation of the two methods.
While refining a regexp on a search results page, keep in mind that the snippet "wikitext" has modified spacing. Regex are sensitive to space characters, so copying from snippets is dangerous.

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:

  • 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:"<tag>[[link|2\3?]]\</tag>" insource:/"<tag>[[link|2\3?]]<"\/"tag>"/

Regex on titles

The insource keyword does only search the page source content. To run regex searches on the title strings intitle:/regex/ can be used.

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 fmt=commas having any allowable spaces around it, (it could be the same template call, or a separate one):

hastemplate:val insource:"fmt commas" insource:/\{\{ *[Vv]al *\|[^}]*fmt *= *commas/ insource:/\{\{ *[Vv]al *\|[^}]*[-+]?[0-9]{3,4} *[|}]/

Note that the = sign in "fmt commas" is not needed but that adding it would not change the search results. It is fast because it uses two filters so that every page the regexp crawls has the highest possible potential.

Geobúsqueda

Searching based on the (primary) coordinates associated with pages. Depends on Extension:GeoData and {{#coordinates:}}

bounded

Es posible limitar la búsqueda a páginas que se hayan identificado como próximas a las coordenadas geográficas que indiques. The coordinates can either be specified as a <lat>,<lon> 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. Ejemplos:

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

boosted

Además, es posible aumentar el puntaje de las páginas cuya ubicación esté dentro de una zona geográfica específica. 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

1.28
Gerrit change 311061

Since MediaWiki 1.28, CirrusSearch supports indexing and searching of properties of files in the File: namespace. This includes:

  • file media type
  • MIME type
  • size
  • width & height
  • resolution
  • bit depth for files that support these
While these predicates are useful only for files, they by themselves do not limit search to the File: namespace. It is recommended to include this namespace in a search or restrict the search to only this namespace when using these conditionals.

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:

  • UNKNOWN
  • BITMAP
  • DRAWING
  • AUDIO
  • VIDEO
  • MULTIMEDIA
  • OFFICE
  • TEXT
  • EXECUTABLE
  • ARCHIVE

This list may be extended in the future. See also MEDIATYPE_* constants in Defines.php.

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 image/png
  • filemime:pdf - look for all PDF documents
  • -filemime:pdf - skip all PDF documents (notably on Commons)

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} o 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, 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 measure can be:

filew or filewidth - file width

fileh or fileheight - file height

fileres - file resolution (see above)

filebits - file bit depth

Ejemplos:

filew:>800 fileh:>600 - files that are at least 800×600 pixels in size

filebits:16 - files with 16-bit color depth

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

Wikibase search

The Wikibase extension defines some search keywords in order to make it easier to search for certain Wikibase items. This is useful on Wikidata and other Wikibase sites, including to search for images with Structured data on Wikimedia Commons . See Help:WikibaseCirrusSearch for details.

Cross-wiki search results

There are two kinds of cross-wiki results that may be shown when searching on Wikipedia.

Cross-project search (also known as interwiki search, sister search, or sister projects search) shows additional results from other projects (Wiktionary, Wikisource, Wikiquote, etc.) shown to the side on the Wikipedia results page. Cross-project search is available on most Wikipedias with sister projects.

Cross-language search (see blog post) refers to additional results shown below the main results that are from a Wikipedia in a different language. Cross-language search uses a heavily modified and optimized version of a light-weight language detector called TextCat . Cross-language search is currently only available on a few Wikipedias (see TextCat link for details).

Explicit sort orders

In addition to the default relevance based sort, CirrusSearch can provide results using a few other explicit sort orders. Specifying a sorting order other than relevance will disable all search keywords that affect scoring, such as prefer-recent or boost-templates. The keywords will still be parsed, but they will have no effect.

Sorting options are currently available from the MediaWiki API by providing the srsort parameter.

Guidance:

Sorting options can be manually added to a search URL by adding &sort=order, for example:

Valid sort orders include:

URL supplement Description
&sort=incoming_links_asc Lowest to highest number of incoming links. This is approximately from least to most popular.
&sort=incoming_links_desc Highest to lowest number of incoming links. This is approximately from most to least popular.
&sort=last_edit_asc From least recently to most recently edited
&sort=last_edit_desc From most to least recently edited
&sort=create_timestamp_asc From least to most recently created
&sort=create_timestamp_desc From most to least recently created
&sort=just_match A simple relevance sort based only on text matching
&sort=relevance A relevance sort taking into account many features of the document
&sort=random Randomized
&sort=none Unsorted, arbitrarily ordered lists. Preferred for large result sets.

Interface for advanced options

 
Advanced Search Interface

The AdvancedSearch extension adds an improved interface to the search page allowing the use of several options described above in a user-friendly manner. See here for the user manual.

Véase también

  • See Ayuda:Búsqueda for MWSearch, used by the many wikis that don't have a search extension.

External links

Notes and references

  1. Nótese que el tagline no es parte del contenido real. Para ver el contenido susceptible de ser buscado para una página, anexa ?action=cirrusdump a la URL.
  2. Palabras de parón son raramente pedidas en CirrusSearch, excepto cuándo son en clases seguras de frases, cuando explicó abajo.
  3. Los parámetros de CirrusSearch no utilizan un método consistente para manipular estos términos de búsqueda.
  4. El mismo analyzer utilizó a índice el wikitext es también utilizado para interpretar la consulta.
  5. Por ejemplo, los términos comunes en este wiki, Mediawiki.org, se buscan de forma redundante:
    • udp2registro o udp2registro2
    • html2wt o wt2html
    • Registro2ip o ip2registro
    Hay prueba2wiki, wiki2xml, wiki2dict, apache2handler, apache2ctl, etc.
  6. La expresión regular CirrusSearch no aborda el carácter de nueva línea directamente, pero un punto . coincidirá con una nueva línea.
  7. Una búsqueda de expresiones regulares lenta no puede deshabilitar la búsqueda, pero puede deshabilitar la búsqueda de expresiones regulares de otra persona, ya que solo hay un número limitado de búsquedas de expresiones regulares permitidas a la vez.
  8. El prefijo no coincide con los primeros caracteres de los nombres completos, por lo que no se pueden buscar dos espacios de nombre a la vez sólo porque empiecen por las mismas letras, como por ejemplo namespace y namespace talk en una consulta.
  9. For the formal definition see the Lucene grammar for regular expressions.
  10. Class RegExp, Lucene RegExp syntax