Hide

Help:How do I search

From Jesus Wiki
Jump to: navigation, search

How do I search

There is a powerful search field in the upper right corner of every page. The search is driven by Elasticsearch through the CirrusSearch extension and all advanced search options are available as per its help page. The Elasticsearch allows:

  • set up exact or fuzzy search
  • reduce the results by targeting search at given mediawiki concept, like namespace, page title, category, etc.
  • search in rendered page content or in page source

Below we'll just list the most simple and useful search rules.

Words, phrases, and modifiers

The basic search term is a word or a "phrase in quotes". Search recognizes a "word" to be:

  • a string of digits
  • a string of letters

Quotes around words mark an "exact phrase" search. A given search term matches against content (rendered on the page). To match against wikitext instead, use the insource search parameter (See section below).

Case

  • The search is case insensitive
  • The algorithm is able to search for parts of a camelCase pattern separately.

Spacing

Spacing between words, phrases, parameters, and input to parameters, can include generous instances of whitespace and greyspace characters. "Greyspace characters" are all the non-alphanumeric characters ~!@#$%^&*()_+-={}|[]\:";'<>?,./. A mixed string of greyspace characters and whitespace characters, is "greyspace", and is treated as one big word boundary. Greyspace is how indexes are made and queries are interpreted, and some of them will be explained further.

Fuzzy search

Putting a tilde ~ character after a word or phrase activates a fuzzy search. It may be followed by a whole number or decimal fraction that specify a fuzziness level.

  • For a word, a tilde ~ means extra characters or changed characters. You may set a fuzziness level adding a decimal fraction to the tilde: word~.1 is most fuzzy, and word~.9 is least fuzzy, and word~1 is not fuzzy at all.. By default 0.5 value is used, that means, eg. for the pattern word~0.5 at most two letters can be found swapped, changed, or added, but never the first two letters.
  • For a phrase, a tilde ~ requires a whole number telling it how many extra words to fit in. For example, "exact one two phrase"~2 matches exact phrase (the distance between two words will not exceed 2 words). For a proximity phrase, a large whole number can be used, but that is an "expensive" (slow) search.
  • For a phrase (reverse order). The algorithm is capable to find a reverse order matches, where the search words are within n words fragment. For example "algernon flowers"~3 matches flowers algernon, flowers of Algernon, and does not match flowers are for Algernon (reverse order and within more than 3 words pattern).

Force search

Mediawiki search behaviour is like that: if there is a page which title matches the search pattern, then the user will be forwarded to that page, rather than provided with the list of possible matches. A tilde ~ character prefixed to the first term of a query guarantees search results instead of any possible navigation.

Wildcards

A wildcard character inside a word can be a (escaped) question \? mark for one character or an asterisk * character for more:

  • b\?d matches bed, bid, bad, bud, etc.
  • b*d matches all the above and, for example, Benhadad or blessed, etc. The asterisk * wildcard matches a string of letters and digits within a rendered word, but never the beginning character.

The *\? is also accepted, but \?* is not recognized.

Logic operators

  • Truth-logic can interpret AND and OR like this: benhadad OR bond to match pages with both words.
  • Truth-logic understands -= or ! prefixed to a term to invert the usual meaning of the term from "match" to "exclude": b*d -benhadad will return all pages containing bed, bid, bad, blessed, etc. except those containing Benhadad as well.

Insource

Insource search is made for finding any phrase in MediaWiki markup. Needed for admins mainly. This phrase completely ignores greyspace: insource: "state state autocollapse" matches |state=autocollapse. The insource search:

  • Searches wikitext only.
  • Neither finds things "sourced" by a transclusion.
  • Neither does fuzzy, or proximity searches.

Prefix and namespace

You can make the search look for given patterns in certain namespaces only:

  • : james will search for pages containing james in the main (public) namespace
  • personal: james will search for pages containing james in the personal namespace, where topics and subtopics created by users are stored
  • bible: james will search for pages containing james in the bible namespace, wher bible verses are stored
  • all: james will search for pages containing james in all namespaces

Instead, you can search for pages titles (full names including the namespace) starting with a given prefix:

  • prefix:CU will search for pages starting with cu in the main namespace (eg. Curse/Against Cain or Curse or Cush, etc.)
  • prefix:Bible:CU will search for pages starting with cu in the bible namespace (eg. CUV/Gen/1/3 or CUVS/Dan/1/4, etc.)
  • Ham prefix:Cush/ will list any subpages of Cush, but only if it also contains the word "ham".

Intitle and incategory

Word and phrase searches match in a title and match in the category box on bottom of the page. But with these parameters you can select titles only or category only. A filter can have multiple instances, and negated instances.

  • intitle:foo Find articles whose title contains foo.
  • intitle:"fine line" Find articles whose title contains fine line.
  • 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:Ruth Find articles that are in Category:Ruth.
  • incategory:"king james version" Find articles that are in Category:King James Version.
  • incategory:"ruth" incategory:"King James Version" Find articles that are in both Category:Ruth and Category:King James Version.
  • -incategory:"king james version" incategory:"ruth" Find articles that are not in Category:King James Version but are in Category:Ruth.


Hide