On Mon, Jun 29, 2015 at 8:52 AM, Brenton Horne <brentonhorne77(a)gmail.com>
wrote:
Hi,
I would like to allow advanced searches on my Local Wikis (MySQL
databases: HMWiki, Linux_Wiki) and I was wondering which MediaWiki
extensions will allow me to do this. Now I realize what I'm saying so far
is casting my net a bit wide so odds are many of you won't know what to
recommend so I'm going to give some examples of what I want to be able to
do with such a search:
* Enable searching specific parts of pages like its title, category(ies),
section(s), section(s) titles, body (i.e., the text other than the page's
title), etc. Instead of searching the entire page the way Wiki searches do
by default.
I don't believe you can do this with the MySQL backed search
implementation. At this point on site search at WMF is provided by
CirrusSearch backed by Elasticsearch. If you are willing to go through the
setup process then you'll get things like incategory and insource and
intitle. There isn't a specific syntax to limit the search to section
titles or the body.
* Support for Boolean operators (e.g., AND, OR,
ANDNOT, etc.) between
search criteria (e.g., I would like to search for pages belonging to more
than one category. For example, I would be looking for pages belonging to
category $1 AND category $2 AND category $3).
This exists in CirrusSearch to some degree. Searching for ```foo AND (bar
OR baz)``` works but ```intitle:foo AND (incategory:bar OR
incategory:baz)``` doesn't. We're working to fix that but its difficult
because we painted ourselves into a corner implementation wize.
Now my experience with this mailing list tells me not to expect a response
here for days at least. But I also know that this list also gets about 2-10
messages per day, depending on the day. I don't want my email server to get
packed with emails that I'm not interested in (as I'm afraid I'm pretty
useless as far as helping others with issues relating to MW, I'm really
just here to receive help not to provide it) so I will stay on this list
for probably at most a week: if you send a reply and get no answer from me
within a 12 hours odds are I won't be receiving emails from this list any
more so it would be best to just send your emails to my email address:
brentonhorne77(a)gmail.com <mailto:brentonhorne77@gmail.com>.
Further information
* MediaWiki version: 1.25.1.
* MySQL, PHP, Lua (I have the Scribunto extension enabled on both Wikis),
Apache, /etc./ are all maintained as the latest versions available for the
operating system specified below.
* Operating system: 32 bit Ubuntu 15.04.
* Understanding of PHP and other programming languages used in MediaWiki:
novice. Use simple English please. I can follow simple instructions, like
add these lines to this file and save it here, but if you give me a task
without explicit step-by-step instructions odds are I won't be able to
follow ya.
Setting up CirrusSearch involves:
* Installing Elasticsearch somewhere your wiki can access it.
* Firewalling Elasticsearch (or otherwise locking it down) and set some
configuration variables and restarting it.
* Setting some globals.
* Running two maintenance scripts.
It works much better if you are using Redis for the MediaWiki job queue but
works OK without it.
So its somewhat involved but nowhere near the undocumented process of
setting up the search that was in use a year ago. I couldn't guess how long
it'd take you. There are folks in freenode's #wikimedia-search who could
help at least 16 hours a day, five days a week.
Nik