mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Praveen Kumar
Subject: Re: [GMG-Devel] Want a new hook for a search plugin
Date: Wed, 6 Jan 2016 23:24:21 +0530

Hey Christopher, Tom!

I would be more than happy to help get this integrated with MediaGoblin. I can 
collaborate 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 in
MediaGoblin that was done by Praveen Kumar?  I believe it's at
  https://github.com/praveen97uma/mediagoblin_gsoc

Unfortunately, though I would like to see it merged, it hasn't been.  I
feel guilty about this because Praveen did a lot of good work and I'd
love to see those ideas integrated.

I think your concerns about setup/teardown are valid.  Though, one
thought I've had is maybe there should be either some "larger" command
that is like "gmg updateall" or something that can run both dbupdate and
some other search related command.

One thing missing from Praveen's branch at present is the ability to
index 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're
interested in suggesting where they should go, or fielding a patch, I
could give it a try.

Would you also be interested in looking at Praveen's branch and seeing
how much overlap there is?

Thanks!  And sorry about the delay in replying, it's been a busy
month....

Happy hacking!
 - cwebb
_______________________________________________
devel mailing list
address@hidden
http://lists.mediagoblin.org/listinfo/devel



--
Cheers

Praveen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]