Jump to content

Help talk:Searching: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Undid revision 908626713 by Andyloftus26 (talk)
Falsifian (talk | contribs)
Line 146: Line 146:
:The operators <code>AND</code> and <code>OR</code> are used by the search engine, but '''do not have the expected boolean logical meaning''' and should be used with great care. See the [[mw:User:TJones_(WMF)/Drafts/Logical_operators_in_on-wiki_search|additional documentation]] for an in-depth explanation.
:The operators <code>AND</code> and <code>OR</code> are used by the search engine, but '''do not have the expected boolean logical meaning''' and should be used with great care. See the [[mw:User:TJones_(WMF)/Drafts/Logical_operators_in_on-wiki_search|additional documentation]] for an in-depth explanation.
I've also written a draft of the longer explanation (~1200 words) of the use of [[mw:User:TJones_(WMF)/Drafts/Logical_operators_in_on-wiki_search|Logical operators in on-wiki search]]. '''Feedback is much appreciated!''' I still need to review the rest of the Help:Searching page and mw:Help:CirrusSearch page to see if any other changes are needed there. [[User:TJones (WMF)|TJones (WMF)]] ([[User talk:TJones (WMF)|talk]]) 15:29, 30 July 2019 (UTC)
I've also written a draft of the longer explanation (~1200 words) of the use of [[mw:User:TJones_(WMF)/Drafts/Logical_operators_in_on-wiki_search|Logical operators in on-wiki search]]. '''Feedback is much appreciated!''' I still need to review the rest of the Help:Searching page and mw:Help:CirrusSearch page to see if any other changes are needed there. [[User:TJones (WMF)|TJones (WMF)]] ([[User talk:TJones (WMF)|talk]]) 15:29, 30 July 2019 (UTC)

== ^ and $ in intitle regular expressions ==

I would expect <code>{{search link|intitle:/^Europe/}}</code> to show pages with titles starting with "Europe", but instead there are no results. Is the lack of support for <code>^</code> and <code>$</code> in regular expressions a known limitation? Is there a workaround?

Revision as of 17:33, 18 August 2019

WikiProject iconWikipedia Help C‑class High‑importance
WikiProject iconThis page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.
CThis page does not require a rating on the project's quality scale.
HighThis page has been rated as High-importance on the project's importance scale.

Search without folding

How do I search for article titles containing the word "Strasse"? I tried intitle:Strasse and intitle:"Strasse" and intitle:/Strasse/; they all returned titles with "Straße". -- Michael Bednarek (talk) 01:24, 29 January 2018 (UTC)[reply]

I don't think our search function can do it for titles. It can do exact match searches and other regex searches with insource: but not intitle: (requested in phab:T156474). You can use https://tools.wmflabs.org/grep/ for that. PrimeHunter (talk) 02:11, 29 January 2018 (UTC)[reply]
Michael, this has now been fixed, so intitle: supports regular expressions, so intitle:/Strasse/ won't find "Straße" anymore. (But neither Help:Searching#intitle: nor mw:Help:CirrusSearch has yet been updated to document it.) --Pipetricker (talk 09:18, 15 May 2018 (UTC)[reply]
It is now documented. --Pipetricker (talk) 17 February 2019
You can use intitle:Strasse intitle:/Strasse/ to only find whole words. PrimeHunter (talk) 10:56, 15 May 2018 (UTC)[reply]
Good point. And it also limits the expensive regex search. --Pipetricker (talk) 12:49, 15 May 2018 (UTC)[reply]

To do list

Main revamp is complete. I'll be back to work on this page some more. Though feel free to jump in and improve the page. The more the merrier. Below is a task list of work needed on the page. Feel free to add to it.     — The Transhumanist    08:16, 16 March 2018 (UTC)[reply]

  • Place content from overview section  Done
  • Identify the search engine  Done covered in the section "Under the hood"
  • Integrate merge section under search box  Done
  • Integrate merge section under search results page  Done
  • The section Help:Searching#Understanding search results needs a heavy editing.  Done
  • Integrate the list items under Search string syntax  Done
  • Check Allpages for subpages of Help:Searching  Done see below
  • Gather missing information, from:  Done
  • Gather links about searching for the see also section  Done
  • More redirect support  Done
    • Section redirect support.  Done
  • Redirect maintenance  Done
    • Check all redirects leading to the page, and correct if needed  Done
  • Shortcut support for sections  Done
  • List the shortcuts in shortcuts directory  Done
  • Integrate boolean list item into section prose  Done
  • The section Help:Searching#Refining results needs a heavy editing.
  • The lead needs refining, and section linkification.
  • Namespace and sister project prefixes should be covered, or at least a link to the help pages should be provided.
  • A full proofread is needed.
  • Check these facts (include them if they verify as accurate)
    • Each parameter has search indexing and page ranking prerequisites
    • A regular expression search is not an indexed search, and so in order to pre-establish its reasonable search domain, a regular expression search requires an accompanying search term that is an indexed-search filter
    • Every search box and search link and inputbox has the same search engine and same search results page, Special:Search.
    • It also offers one-button modification of the search domain, and through user preferences, the Wikipedia Search results page can run the search on other search engines, and go to their search results page.
    • When presenting results, the internal search understands and will link to relevant sections of a page
    • The ordering of the list of search results is determined by the page ranking software, but you can make adjustments to it. [How?]
    • For articles, a message box may show up beside a listing, indicating that it has a sister page on another project, such as a Wiktionary entry that defines the title of a Wikipedia article.
  • Track down the bug in regular search box pertaining to subpageof: parameter
  • Gather missing information, from:

Getting to advanced search faster

Has anyone already done a JS script that adds some way to get directly to Advanced Search without first having to do a search? I almost never use the search box to just search for something, unless I"m in "reader mode" and am not working as an editor. My usual routine is to enter something like asdfjasodfijasdofj in the search box and search on it, then get into advanced mode, then pick my namespaces, then replace the search string with what I'm actually looking for. Rather inefficient. Hoping there's a "widget" of some kind that puts advance search as a clickable icon or something next to the default search box, in the site-wide top menu.  — SMcCandlish ¢ 😼  21:48, 13 July 2018 (UTC)[reply]

Your method can start with an empty search. You can place the below in your common JavaScript to get a Search link to the left of "Log out". PrimeHunter (talk) 23:14, 13 July 2018 (UTC)[reply]
$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).done( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.getUrl('Special:Search') + '?profile=advanced',
    'Search',
    'pt-Search',
    'Go to advanced search',
    null,
    '#pt-logout'
  );
});

How to ask "is infobox parameter coordinates" controlled by wikidata values?

I asked this question (more or less) over at the WP:Helpdesk, where is has been greeted with '???!?!?' so far. It is an unusual search request!

Tsing Yi North Bridge used to show geophysical coordinates displayed twice. For reference, Tsing Yi South Bridge still does. The coordinates were coming from both an embedded

{{Coord|22|21|36.5|N|114|6|36.7|E|display=title|type:landmark}}

and from Wikidata.

So the question is: how could I search for articles where the {{Coord}} template is used and where now Wikidata is enabled for the articles and has coordinates values? I can't see the ability to ask questions about Wikidata and a particular article.

I'd really hate to check every page that uses the {{Coord}} template, cuz I think it said 1.1 million? Shenme (talk) 03:00, 11 August 2018 (UTC)[reply]

How do I "ask" for an article to be created?

The page "Universal welfare" does not exist. You can ask for it to be created, but consider checking the search results below to see whether the topic is already covered.

I clicked the "ask for it to be created" and it just sends me to "Wikipedia:Articles for creation" I don't see an "ask" function there. — Preceding unsigned comment added by 69.206.181.191 (talk) 06:35, 5 April 2019 (UTC)[reply]

Neither do I. I think Wikipedia:Requested articles, which has the heading "How to request an article", would be a more suitable link in that message. --Pipetricker (talk) 11:22, 5 April 2019 (UTC)[reply]
Wikipedia:Articles for creation#Creating a draft says: "If you have an idea for the title of an article, but no content for the article itself, please make a request at Wikipedia:Requested articles". But it's not prominent, and there is no apparent reason to read the section if you don't want to create a draft. MediaWiki:Searchmenu-new-nocreate added the link in 2011 when Wikipedia:Articles for creation linked Wikipedia:Requested articles in the opening paragraph.[1] Wikipedia:Requested articles does seem like a more logical target for MediaWiki:Searchmenu-new-nocreate. PrimeHunter (talk) 12:36, 5 April 2019 (UTC)[reply]

Wikipedia:RESULTS listed at Redirects for discussion

An editor has asked for a discussion to address the redirect Wikipedia:RESULTS. Please participate in the redirect discussion if you wish to do so. UnitedStatesian (talk) 13:06, 12 April 2019 (UTC)[reply]

Wikipedia:LOPS listed at Redirects for discussion

An editor has asked for a discussion to address the redirect Wikipedia:LOPS. Please participate in the redirect discussion if you wish to do so. UnitedStatesian (talk) 13:13, 12 April 2019 (UTC)[reply]

Wikipedia:WILDCARDS listed at Redirects for discussion

An editor has asked for a discussion to address the redirect Wikipedia:WILDCARDS. Please participate in the redirect discussion if you wish to do so. UnitedStatesian (talk) 13:22, 12 April 2019 (UTC)[reply]

Wikipedia:Regex listed at Redirects for discussion

An editor has asked for a discussion to address the redirect Wikipedia:Regex. Please participate in the redirect discussion if you wish to do so. UnitedStatesian (talk) 13:23, 12 April 2019 (UTC)[reply]

An editor has asked for a discussion to address the redirect H:S. Please participate in the redirect discussion if you wish to do so. UnitedStatesian (talk) 16:46, 14 May 2019 (UTC)[reply]

regex look behind /look ahead example?

I want to find all instances of "Phi Alpha" on Wikipedia that are not part of "Alpha Phi Alpha" or "Phi Alpha Theta". But I can't get the look ahead or look behind syntax to work. Does Cirrus Search do look ahead/look behind examples? I know to pair whatever I can do in insource with simply searching for "Phi Alpha" in order to have it finish at all.Naraht (talk) 19:32, 8 July 2019 (UTC)[reply]

@Naraht: The built-in search supports only a limited subset of the regular expression syntax. H:INSOURCE links to mw:Help:CirrusSearch#Regular expression searches, which tries to explain what is supported, and that links to a formal definition of the supported syntax. There's nothing about look aheads/look behinds. -- John of Reading (talk) 20:52, 8 July 2019 (UTC)[reply]
John of Reading Thank You.Naraht (talk) 08:38, 9 July 2019 (UTC)[reply]

Deepcat

The deepcat example (deepcat:"musicals") seems to be off. For some reason, if the category's first letter is not capitalized, the search doesn't seem to search in the subcategories. First see Category:Musicals and then compare these searches: deepcat:"musicals" vs. deepcat:"Musicals". The latter search also gives the following warning: "A warning has occurred while searching: Deep category query returned too many categories". Maybe we should change the example search and category to a smaller category with correct capitalization, for example to deepcat:"Musicals by topic"? 85.76.139.129 (talk) 19:58, 12 July 2019 (UTC)[reply]

Reported as phab:T228633TheDJ (talkcontribs) 10:09, 22 July 2019 (UTC)[reply]

Please review proposed updates to boolean/logical operator documentation

As discussed in more detail in Phabricator ticket T228925, it turns out that parentheses and the boolean operators AND and OR do not actually work as advertised in the documentation. The short term plan is to update the documentation to reflect current reality, and the long term plan is to fix reality to reflect the currently aspirational documentation. Here's the first draft of the update to go in the Help:Searching Logical operators section:

The search engine supports limited boolean logic in searches. Logical NOT (negation) can be indicated by a "-" (minus sign) or a "!" (exclamation point) character prefixed to a search term, or by the NOT keyword.
Parentheses (…) are ignored by the search engine and have no effect.
The operators AND and OR are used by the search engine, but do not have the expected boolean logical meaning and should be used with great care. See the additional documentation for an in-depth explanation.

I've also written a draft of the longer explanation (~1200 words) of the use of Logical operators in on-wiki search. Feedback is much appreciated! I still need to review the rest of the Help:Searching page and mw:Help:CirrusSearch page to see if any other changes are needed there. TJones (WMF) (talk) 15:29, 30 July 2019 (UTC)[reply]

^ and $ in intitle regular expressions

I would expect intitle:/^Europe/ to show pages with titles starting with "Europe", but instead there are no results. Is the lack of support for ^ and $ in regular expressions a known limitation? Is there a workaround?