Help:CirrusSearch/pt

CirrusSearch is a new search engine for MediaWiki. The Wikimedia Foundation is migrating to CirrusSearch since it features key improvements over the previously used search engine, LuceneSearch. Esta página descreve os recursos que são novos ou diferentes em comparação com as soluções do passado.

Perguntas frequentes
Se a sua pergunta não foi respondida aqui, sinta-se livre para perguntar na página de discussão e alguém responderá para você.

O que foi melhorado?
O novo motor de busca dispõe de três principais melhorias em relação ao antigo, nomeadamente:

Melhor suporte para pesquisas em diferentes idiomas.
 * Atualizações mais rápidas para o índice de pesquisa, ou seja, as alterações nos artigos são refletidas muito mais rápido nos resultados.
 * Expanding templates, meaning that all content from a template is now reflected in search results.

Atualizações
Atualizações no índice de pesquisa são feitas em tempo quase real. Deverá ser capaz de pesquisar as mesmas assim que estas forem feitas. As mudanças em predefinições devem, em poucos minutos, entrar em vigor nos artigos que as incluam. As mudanças em predefinições usam a fila de espera, por isso o desempenho pode variar. Uma edição nula ao artigo irá forçar a mudança, mas isso não deverá ser necessário se tudo está estiver a correr bem. You should be able to search for your changes as soon as you make them. Changes to templates should take effect in articles that include the template in a few minutes. The templates changes use the job queue, so performance may vary. A null edit to the article will force the change through, but that shouldn't be required if everything is going well.

Sugestões de pesquisa
As sugestões de pesquisa que aparecem quando digita na caixa de pesquisa são ordenadas substancialmente pelo número de ligações internas recebidas. Algo digno de nota é que se começar a sua pesquisa com um til (~), não vamos encontrar nenhum artigo que deseje e pode seguir a qualquer momento, ao carregar na tecla "Enter", para a página de resultados de pesquisa. Worth noting is that if you start your search with ~ we won't find any articles as you type and you can safely hit enter at any time to jump to the search results page.

ASCII/accents/diacritics folding is turned on for English text, but there are some formatting problems with the result. See 52656.

Pesquisa completa de texto
A pesquisa completa de texto (aquela que o leva à página de resultados) em títulos, redirecionamentos, cabeçalhos e textos de artigo não deverá trazer quaisquer surpresas. A grande alteração é que agora também abrange predefinições.

Stemming
There is support for dozens of languages, but all languages are wanted. There is a list of currently supported languages at elasticsearch.org; see their documentation on contributing to submit requests or patches.

Filtros (intitle: e incategory:)


Reforçámos um pouco a sintaxe em torno destes exemplos.


 * intitle:foo
 * Find articles whose title contains foo. Stemming is enabled for foo.
 * intitle:"fine line"
 * Find articles whose title contains fine then line. Stemming is enabled. Matches The finest (lines) but not The finest ever lines.
 * intitle:foo bar
 * Find articles whose title contains foo and whose title or text contains bar.
 * -intitle:foo bar
 * Encontre artigos cujos títulos não contenham a palavra "bar", mas, quer seja no título ou texto incluso, possuam a palavra "foo".
 * intitle: bar foo
 * Erro de sintaxe, devolve aos resultados de pesquisa artigos cujos títulos ou textos incluam as palavras "intitle:", "foo" e/ou "bar".
 * incategory:Música
 * Encontra artigos que estejam na Categoria:Música
 * incategory:"História da música‎"
 * Encontra artigos que estejam na Categoria:História da música‎
 * 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
 * cow*
 * Find articles whose title or text contains words that start with cow
 * linksto:Help:CirrusSearch
 * find articles that link to a page
 * -linksto:Help:CirrusSearch CirrusSearch
 * find articles that mention CirrusSearch but do not link to the page Help:CirrusSearch

prefix:
Na sua forma atual, a sintaxe prefix: é invocada para vários tipos de funcionalidades, logo foi recriada com o maior tipo de exatidão possível.


 * prefix:vaca
 * Encontre artigos nos domínios de conteúdo cujo título comece com a palavra "vaca".
 * doméstica prefix:vaca
 * Encontre artigos nos domínios de conteúdo cujo título comece com a palavra "vaca" e contenha a palavra "doméstica".
 * doméstica prefix:Vaca/
 * Encontre todas as subpáginas do artigo "Vaca" nos domínios de conteúdo que contenham a palavra "doméstica". Este tipo de pesquisa é bastante comum e frequentemente construído com um parâmetro de URL especial chamado.
 * doméstica prefix:Discussão:Vaca/
 * Encontre todas as subpáginas da página de discussão "Discussão:Vaca", no domínio de discussão, que contenham a palavra "doméstica".
 * vaca prefix:Pink Floyd/
 * Encontre todas as subpáginas do artigo "Pink Floyd", nos domínios de conteúdo, que contenham a palavra "vaca". O espaço não é significativo agora.

Repare que a regra anterior, de incluir prefix: no final da consulta, ainda se aplica.

Prefixos especiais

 * Find articles whose text is most similar to the text of the given articles.
 * The  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:
 * : Minimum number of documents (per shard) that need a term for it to be considered.
 * : Maximum number of documents (per shard) that have a term for it to be considered.
 * : Maximum number of terms to be considered.
 * : Minimum number of times the term appears in the input to doc to be considered. For small fields this value should be 1.
 * : Minimal length of a term to be considered. Defaults to 0.
 * : The maximum word length above which words will be ignored. Defaults to unbounded (0).
 * (comma separated list of values): These are the fields to use. Allowed fields are,  ,  ,  ,   and.
 * ( | ): use only the field data. Defaults to : the system will extract the content of the   field to build the query.
 * : The percentage of terms to match on. Defaults to 0.3 (30 percent).
 * Example:
 * These settings can be made persistent by overriding  in Help:System message.
 * Find articles in the talk namespace whose title or text contains the word foo
 * Find articles in the file namespace on this wiki and commons whose title or text contains the word
 * You can add  to the query (like  ) to remove the results from commons
 * Find articles in the file namespace on this wiki and commons whose title or text contains the word
 * You can add  to the query (like  ) to remove the results from commons
 * You can add  to the query (like  ) to remove the results from commons
 * You can add  to the query (like  ) to remove the results from commons

Será que quis dizer
As sugestões "Será que quis dizer" são projetadas para perceber se digitou incorretamente uma frase incomum, que pode também ser um título do artigo. Se assim for, será informado sobre o erro.

Prefira correspondências de frase
Prefira correspondências idênticas

Fuzzy search
Putting a ~ after a search term (but not double quotes) activates fuzzy search. You can also put a number from 0 to 1 to control the "fuzziness" fraction, e.g. nigtmare~.9 or lighnin~.1 or lighnin~0.1. Closer to one is less fuzzy.

Procura de frase~proximidade

Surrounding some words with quotes declares that you are searching for those words close together. You can add a ~ and then a number after the second quote to control just how close you mean. The proper name for this "closeness" is "phrase slop". The default "phrase slop" is 1.

Aspas e correspondências exatas
As aspas ("") ajudam a encontrar os termos correspondentes exatos. Pode adicionar um til (~) à citação para regressar à correspondência mais explícita que conhece e adora.

prefer-recent:
You can give recently edited articles a boost in the search results by 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 must be a number between 0 and 1 inclusive. half_life_in_days must be greater than 0 but allows decimal points. This number works pretty well if very small. I've tested it around .0001, which is 8.64 seconds.

This will eventually be on by default for Wikinews, but there is no reason why you can't activate it in any of your searches.

hastemplate:
You can find pages that use a certain template by adding the filter  to the search. We provide for the usual "syntactic sugar" of template calls. This means the lenient pagename and fullpagename capitalization works, and the main namespace abbreviation, ":" works. For example to find which pages transclude Quality image the full search (in all your preferred namespaces) can be: , and for that same template name in the main namespace, this works. You can omit the quotes if the template title does not contain a space. will filter pages that do not contain that template.

For wikitext that calls a template directly, you can use insource:, but hastemplate: searches the "post-expansion inclusion", so hastemplate: can find a template acting only temporarily as a "secondary template" or "meta-template", which are seen in neither the source nor content, ( but only included as a helper to any other template producing the final content). All content from a template is now reflected in search results is still the relevant philosophy here.

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:


 * Find files in the China category sorting quality images first.
 * Find files in the China category sorting quality images first.


 * Find files in the China category sorting quality images first and low quality images last.
 * Find files in the China category sorting quality images first and low quality images last.


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

Don't try to add decimal points to the percentages. They don't work and search scoring is such that they are unlikely to matter much.

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  would find a featured article with those words scattered throughout it instead of the article for Brave New World.

Sorry for the inconsistent  in the name. Sorry again but the quotes are required on this one. Sorry also for the funky syntax. Sorry we don't try to emulate the template transclusion syntax like we do with.

insource:
searches wikitext. It has two flavors: one is delimited by /by slashes/:
 * and
 * These are like regular content search in that they are fast and case-insensitive, but they only recognize letters and numbers and spaces, and ignore the non-alphanumeric characters such as brackets, punctuation marks, or math symbols.


 * and
 * This can pick up template arguments, URLs, links, html etc. They are as thorough and precise as possible because they search wikitext by Regular expressions. They aren't efficient and we only allow a few of them to run at a time on the search cluster, but they are very powerful. The version with the extra   runs the expression case-insensitive, and is even less efficient.


 * Tip: Instead of running insource: searches directly, these return much much faster if they never run alone, but always alongside other items in the query to act as filters results, such as:


 * For a successful released in the wild, use
 * to hone the regex. A regexp typically needs development and testing with some target test data.
 * To search for the regex metacharacters literally, you must escape them, usually one at a time by backslash-escape. Two other ways to escape characters exist that use delimiters to escape a set of characters: double-quote-escape, and square-bracket escape. Inside these you can still backslash-escape the double-quote or square bracket characters: "A literal \" character", or [-.\]]: a literal dash, dot, or right square bracket. Since the slash delimits the entire regexp, it must always be escaped inside the regexp.  Inside a template, a regexp search for a pipe character is also template-escaped: the search box version of insource:/\|/ becomes the template version insource/\{ {!}}/. For the metacharacters and there meanings see the explanation of the syntax.  For the formal definition see the Lucene grammar for regular expressions.
 * To search for the regex metacharacters literally, you must escape them, usually one at a time by backslash-escape. Two other ways to escape characters exist that use delimiters to escape a set of characters: double-quote-escape, and square-bracket escape. Inside these you can still backslash-escape the double-quote or square bracket characters: "A literal \" character", or [-.\]]: a literal dash, dot, or right square bracket. Since the slash delimits the entire regexp, it must always be escaped inside the regexp.  Inside a template, a regexp search for a pipe character is also template-escaped: the search box version of insource:/\|/ becomes the template version insource/\{ {!}}/. For the metacharacters and there meanings see the explanation of the syntax.  For the formal definition see the Lucene grammar for regular expressions.


 * For example, to find usage of a template called Val with an unnamed parameter of three to four digits having a possible minus sign and, on the same page, Val with a named argument "fmt=commas":

Texto auxiliar
Cirrus considera que algum texto na página pode ser "auxiliar" sobre o tema da mesma. Exemplos incluem conteúdo de tabelas, legendas de imagens e ligações do tipo "Este artigo é sobre XYZ. Para ZYX, veja ZYX". Pode ainda marcar o texto do artigo como auxiliar ao adicionar a classe  ao elemento HTML contido no texto. Show indifference

O texto auxiliar vale menos do que o resto do texto do artigo estará presente apenas se não houver excertos principais de artigos que correspondam à pesquisa.

Introdução
Cirrus assume que o texto não-auxiliar que está entre o topo da página e o primeiro parágrafo é a introdução. Correspondências no parágrafo introdutório valem mais para a posição do artigo nos resultados da pesquisa.

Commons Search
By default when the search contains the file namespace, Cirrus will search commons as well. You can disable this behavior by adding  to the search. If you are using a namespace prefix to select the namespace the syntax looks like. If you aren't using a namespace prefix to select the namespace then the syntax looks like.

Ver também

 * Especificações completas nos testes em navegador