Fandom Developers Wiki
No edit summary
Tags: Visual edit apiedit
m ([MobileEditor] Undo revision 121570 by FANSG (talk) Please reply to the talkpage if you're encountering issues.)
(19 intermediate revisions by 12 users not shown)
Line 1: Line 1:
  +
{{Languages}}
 
{{Infobox JavaScript
 
{{Infobox JavaScript
 
| Image file = SearchSuggest.png
 
| Image file = SearchSuggest.png
  +
| Description = Suggests pages while [[Special:Search|searching]]
| Image size = 250px
 
  +
| Scope = ps
| Description = Adds list of matching pagenames to fulltext search
 
  +
| Author =
| Scope = personal or wiki-wide
 
| Author = [[User talk:Pecoes|Pecoes]]
+
* [[User:Pecoes|Pecoes]]
  +
* [[User:KockaAdmiralac|KockaAdmiralac]]
| Updated = 3 Jan 2013
 
 
| Code = [[MediaWiki:SearchSuggest/code.js|code.js]]
 
| Code = [[MediaWiki:SearchSuggest/code.js|code.js]]
| Skins = Wikia/Oasis
+
| Type = site
| Languages = {{#language:en}}<br/>{{#language:de}}<br/>{{#language:es}}<br/>{{#language:ca}}<br/>{{#language:hu}}<br/>{{#language:it}}<br/>{{#language:pl}}<br/>{{#language:nl}}<br />{{#language:ru}}<br />{{#language:uk}}
 
 
}}
 
}}
 
Fandom's fulltext search does not pay attention to page titles. So while it is easy to find pages where your search term was mentioned multiple times, it is sometimes impossible to find pages that are ''about'' your search term. The '''SearchSuggest''' script adds the list of best-matching page names to the results page.
   
  +
== Example ==
Wikia's fulltext search doesn't pay attention to page titles. So while it's easy to find pages where your search term was mentioned multiple times, it's sometimes impossible to find pages that are ''about'' your search term. The '''SearchSuggest''' script adds the list of best-matching pagenames to the results page.
 
 
To understand the problem, go to the 24 wiki and search for [{{fullurl:w:c:24:Special:Search}}?query=beau Beau.] There are, at the time of writing this, four pages with the word "Beau" in the page title:
  +
* [[w:c:24:Beau Bowden|Beau Bowden]],
  +
* [[w:c:24:Beau Dremann|Beau Dremann]],
  +
* [[w:c:24:Beau Smith|Beau Smith]] and
  +
* [[w:c:24:Beaumont|Beaumont]].
 
The fulltext search only finds the first three of these.
   
==Example==
+
== Installation ==
  +
{{Script Install
 
 
| codepage = SearchSuggest/code.js
To understand the problem, go to the 24 wiki and search for [http://24.wikia.com/wiki/index.php?search=beau&fulltext=0 Beau]. There are - at the time of this writing - four pages with the word "Beau" in the page title:
 
  +
}}
 
[[w:c:24:Beau Bowden|Beau Bowden]], [[w:c:24:Beau Dremann|Beau Dremann]], [[w:c:24:Beau Smith|Beau Smith]], [[w:c:24:Beaumont|Beaumont]]
 
 
The fulltext search only finds the first of these.
 
 
And here's a screenshot of the results page with the best-matching pagenames added in:
 
 
[[File:SearchSuggest.jpg]]
 
 
==Installation==
 
 
:''See also: [[Help:JavaScript and CSS Cheatsheet]]''
 
To install SearchSuggest, simply add the appropriate row to your <code>importArticles()</code> call in [[w:Special:MyPage/global.js|your global.js]].
 
<source lang="javascript">
 
importArticles({
 
type: 'script',
 
articles: [
 
'u:dev:SearchSuggest/code.js'
 
]
 
});
 
</source>
 
 
==Localisation==
 
 
Post translations on the [[Talk:SearchSuggest|talk page]], please!
 
 
==See Also==
 
 
[[SearchGoButton]]
 
__NOWYSIWYG__
 

Revision as of 13:41, 18 August 2019

Fandom's fulltext search does not pay attention to page titles. So while it is easy to find pages where your search term was mentioned multiple times, it is sometimes impossible to find pages that are about your search term. The SearchSuggest script adds the list of best-matching page names to the results page.

Example

To understand the problem, go to the 24 wiki and search for Beau. There are, at the time of writing this, four pages with the word "Beau" in the page title:

The fulltext search only finds the first three of these.

Installation