Skip to main content

A search plugin for GNU mediagoblin.

Project description

Search plugin for GNU Mediagoblin
###############

|license_badge| |pypi_badge| |version_badge|
|status_badge|

.. |license_badge| image:: https://img.shields.io/pypi/l/mediagoblin-indexedsearch.svg
:target: https://en.wikipedia.org/wiki/Affero_General_Public_License

.. |pypi_badge| image:: https://img.shields.io/pypi/v/mediagoblin-indexedsearch.svg
:target: https://pypi.python.org/pypi/mediagoblin-indexedsearch

.. |version_badge| image:: https://img.shields.io/pypi/pyversions/mediagoblin-indexedsearch.svg
:target: https://pypi.python.org/pypi/mediagoblin-indexedsearch

.. |status_badge| image:: https://img.shields.io/pypi/status/mediagoblin-indexedsearch.svg
:target: https://pypi.python.org/pypi/mediagoblin-indexedsearch

.. |status_badge| image:: https://img.shields.io/pypi/status/mediagoblin-indexedsearch.svg
:target: https://pypi.python.org/pypi/mediagoblin-indexedsearch

.. END_BADGES_TAG

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 http://whoosh.readthedocs.org/en/latest/querylang.html for more syntax info.)

This plugin is based on an existing search plugin, https://github.com/ayleph/mediagoblin-basicsearch/,
but uses a search index for queries.

.. END_DESCRIPTION_TAG


Setting up the search plugin
===========================

Checkout this repository with::

git clone https://github.com/tofay/mediagoblin-indexedsearch.git

Then install the plugin into your virtualenv for mediagoblin::

cd mediagoblin-indexedsearch/
/path/to/mediagoblin/bin/python setup.py install


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

[[indexedsearch]]


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

SEARCH_LINK_STYLE = 'link'

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.

USERS_ONLY = True

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.

Source Distribution

mediagoblin-indexedsearch-0.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mediagoblin_indexedsearch-0.1.1-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

mediagoblin_indexedsearch-0.1.1-py2-none-any.whl (22.6 kB view details)

Uploaded Python 2

File details

Details for the file mediagoblin-indexedsearch-0.1.1.tar.gz.

File metadata

File hashes

Hashes for mediagoblin-indexedsearch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 415b529ef2b49d155b424f50cccfeebcf9c688e1622231f2f7b9d5ed2a7789d4
MD5 71210c35e8889c9f26f6b0d424fd0b90
BLAKE2b-256 ffc95117716272d08b1f30a59d6f7fa7dbe38757d798423b4b68f35de72377c3

See more details on using hashes here.

File details

Details for the file mediagoblin_indexedsearch-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mediagoblin_indexedsearch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 111a67a00c967382ded1d50066af94b8b28677fc8e2c36b2c0e625e97176ca78
MD5 72c6b27d7e8707beabf0facf8dc1bda3
BLAKE2b-256 2d2010afd876c2aa6a6033d7cee3f0fa8bc2fe97e8519d03003402ea2a58139b

See more details on using hashes here.

File details

Details for the file mediagoblin_indexedsearch-0.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for mediagoblin_indexedsearch-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 1c0390a72b7e8017114d014591a8871f9364d7bef564745ddf1047be9be839f6
MD5 ae6c2d1731e00592de724dad4ed90236
BLAKE2b-256 8333a2d8fcae04037522136d9b1d427954998afbce740424f805cb9fd153045c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page