Skip to main content

A search plugin for GNU mediagoblin.

Project description

Search plugin for GNU Mediagoblin

|license_badge| |pypi_badge| |version_badge|

.. |license_badge| image::

.. |pypi_badge| image::

.. |version_badge| image::

.. |status_badge| image::

.. |status_badge| image::


N.B Only works with mediagoblin 0.9.0 and later.

``mediagoblin-indexedsearch`` is a plugin for GNU Mediagoblin that adds support for searching media.

By default, the search function will query the tags, title and description fields
of media for the given phrase.

More complex queries are supported, e.g searching for media with tagged with "hello"
and not tagged with "goodbye" (tag:hello -tag:goodbye), or searching for any
media added by the user "tom" (user:tom).

(See for more syntax info.)

This plugin is based on an existing search plugin,,
but uses a search index for queries.


Setting up the search plugin

Checkout this repository with::

git clone

Then install the plugin into your virtualenv for mediagoblin::

cd mediagoblin-indexedsearch/
/path/to/mediagoblin/bin/python install

Enable the plugin by adding the following line to the ``[plugins]`` section of your mediagoblin config file.


The following parameters can be specified in the indexedsearch section of your mediagoblin
config file:


Specifies the style of the search link that is added to the top header bar of the MediaGoblin instance.
The options for the search link display style are:

* ``form`` displays a search form next to the Log In link. This is the default display style.
* ``link`` displays a normal text link next to the Log In link.
* ``button`` displays an action button link next to the Log In link.
* ``none`` does not display a link. This is useful if you want to create your own search link in a user_dev template or custom theme.

INDEX_DIR = '/path/to/index/directory'

Specifies the directory in which the plugin will create a search index (the plugin will
create the directory if it doesn't exist, assuming correct permissions etc.). By default the index
will be created in /path/to/mediagoblin/user_dev/searchindex.


Specifies whether or not searching for content requires being logged-in. Defaults to True.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mediagoblin-indexedsearch, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size mediagoblin_indexedsearch-0.1.1-py2-none-any.whl (22.6 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size mediagoblin_indexedsearch-0.1.1-py3-none-any.whl (22.6 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size mediagoblin-indexedsearch-0.1.1.tar.gz (10.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page