|
From: | Tom Fay |
Subject: | Re: [GMG-Devel] Want a new hook for a search plugin |
Date: | Tue, 12 Jan 2016 19:48:42 +0000 |
User-agent: | Zoho Mail |
Hey Christopher, Tom!I would be more than happy to help get this integrated with MediaGoblin. I cancollaborate with Tom or work on re-implementing the search plugin from scratch.I guess I had added the script to index the existing items but I may be wrong.On Mon, Jan 4, 2016 at 8:57 AM, Christopher Allan Webber <address@hidden> wrote:Tom Fay writes:
> 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
Heya Tom,Interesting stuff! Have you also looked at the work on search inMediaGoblin that was done by Praveen Kumar? I believe it's atUnfortunately, though I would like to see it merged, it hasn't been. Ifeel guilty about this because Praveen did a lot of good work and I'dlove to see those ideas integrated.I think your concerns about setup/teardown are valid. Though, onethought I've had is maybe there should be either some "larger" commandthat is like "gmg updateall" or something that can run both dbupdate andsome other search related command.One thing missing from Praveen's branch at present is the ability toindex media that already existed... so far it only exists new items.If there are new hooks that should be added, we can add them. If you'reinterested in suggesting where they should go, or fielding a patch, Icould give it a try.Would you also be interested in looking at Praveen's branch and seeinghow much overlap there is?Thanks! And sorry about the delay in replying, it's been a busymonth....Happy hacking!- cwebb_______________________________________________devel mailing list--CheersPraveen
[Prev in Thread] | Current Thread | [Next in Thread] |