Opened 5 years ago

Last modified 4 years ago

#960 in_progress enhancement

Add search functionality

Reported by: anongoblin Owned by: tofay
Priority: major Milestone:
Component: programming Keywords: search find discover
Cc: tofay Parent Tickets:

Description

I cannot find an option to search for media in any MediaGoblin instance. That is quite limiting for finding new media by content.

Subtickets

Change History (4)

comment:1 Changed 4 years ago by Laura Arjona Reina

About this topic, posted in the devel list:

El 03/12/15 a las 09:01, Tom Fay escribió:

Hi there,

I've made a search plugin for Mediagoblin so that I can search by
users/tags as well as description and title (code is at
https://github.com/tofay/mediagoblin-indexedsearch).

It's really just the existing basicsearch plugin, but queries a whoosh
index (like the proposal mentioned https://wiki.mediagoblin.org/Search)
instead of querying the db directly.

Anyways, it creates or updates an index during startup. It can't do this
by using the "setup" hook because when that hook is called the database
hasn't been setup yet. I looked into using some sqlalchemy events to
trigger indexing, but I couldn't find a suitable event.

What I'd like is a hook that notifies plugins when the database has been
setup. Are there any existing hooks I could use for this purposes, and
if not can one please be added? On my instance I'm currently just
calling a new hook at the end of setup_database method.

Thanks,

Tom

comment:2 Changed 4 years ago by Loic Dachary

Type: defectenhancement

comment:3 Changed 4 years ago by tofay

Cc: tofay added
Owner: set to tofay
Status: newin_progress

comment:4 Changed 4 years ago by ayleph

As mentioned above, there's a third-party basicsearch plugin written by me and other GitHub contributors. I don't know if it's of any use to those working on a full-fledged search engine, but you're obviously welcome to pull anything useful from it.

On the topic of using Whoosh, it looks like Kallithea does this. Maybe we could borrow some implementation idea from them, such as using a cron job to update the index.

Note: See TracTickets for help on using tickets.