aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/plugins/indexedsearch/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/plugins/indexedsearch/README.md')
-rw-r--r--mediagoblin/plugins/indexedsearch/README.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/mediagoblin/plugins/indexedsearch/README.md b/mediagoblin/plugins/indexedsearch/README.md
new file mode 100644
index 00000000..cf27ca59
--- /dev/null
+++ b/mediagoblin/plugins/indexedsearch/README.md
@@ -0,0 +1,54 @@
+# Search plugin for GNU Mediagoblin
+
+N.B Only works with mediagoblin 0.9.0 and later.
+
+`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.
+
+## Dependencies
+
+ $ pip install whoosh
+
+## Configure the search plugin
+
+The search plugin adds a search link to the top header
+bar of the MediaGoblin instance. You may specify the
+display style of the search link in your mediagoblin
+config file. There are three options for the
+search link display style.
+
+- `link` displays a normal text link next to the Log In link.
+ This is the default display style.
+- `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.
+
+If you choose to specify the display style,
+add it to your mediagoblin.ini file like this.
+
+ [[mediagoblin.plugins.indexedsearch]]
+ SEARCH_LINK_STYLE = 'link'
+
+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`
+
+ INDEX_DIR = '/path/to/index/directory'
+
+Specifies whether or not searching for content requires
+being logged-in. Defaults to `True`.
+
+ USERS_ONLY = True