[GMG-Devel] Want a new hook for a search plugin

Tom Fay tom at teamfay.co.uk
Fri Dec 18 12:13:39 EST 2015


Thanks,



It turns out that I don't need new a hook for the plugin to work (I can just use, or misuse :), the 'wrap_wsgi' hook which will only be called when the DB/celery are set up). I'll update the issue as well.



Regards,

Tom





---- On Fri, 18 Dec 2015 12:29:55 +0000 Laura Arjona Reina <larjona at larjona.net>wrote ---- 




Hi Tom 



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 





I'm sorry, your message got stuck in the non-subscribers queue in the 

list... 



We have the open issue #960 about search functionality, I just posted 

there the content of your email, hopefully the GNU MediaGoblin hackers 

can give you an answer soon! 



https://issues.mediagoblin.org/ticket/960 



Best regards 



-- 

Laura Arjona 

https://wiki.debian.org/LauraArjona 








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mediagoblin.org/pipermail/devel/attachments/20151218/23c40791/attachment.html>


More information about the devel mailing list