the_wanlorn: Ada Lovelace from the Lovelace & Babbage comic looking upwards in the difference machine. (Ada Lovelace)
The Wanlorn ([personal profile] the_wanlorn) wrote in [site community profile] dw_dev2011-09-07 08:08 pm
Entry tags:

Searching on Hacks?

Is there a way to turn on content searching on our dreamhacks? I'm trying to test Bug 1847, and I'm getting the "Sorry, content searching is not configured on this server." error. Is there a way for me to configure this?

If not! Should I upload the patch that I think might possibly work as something for someone else to work off of if they want to do the bug, or to be reviewed, or just let it lie?
alierak: (Default)

[personal profile] alierak 2011-09-08 04:04 am (UTC)(link)
Yeah, you could conceivably install sphinx in your account, configure and run searchd, set @SPHINX_SEARCHD in config-private.pl, add the sphinx_search role to your database in DBINFO, enable the relevant workers, and away you go. If you can do this, I'd really like to see you add info to this wiki page. If not, maybe someone else can do it, or you can think of a way to pass in some fake search result objects just to test your patch (temporarily replace the sphinx-search-gm worker with a script that doesn't actually use sphinx?)...
alierak: (Default)

[personal profile] alierak 2011-09-08 04:11 am (UTC)(link)
But really, if you think the patch is simple enough to be reviewed by reading it, you might just submit it and let a reviewer decide how much more effort to put in.
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2011-09-09 07:03 am (UTC)(link)
Yes, this too!

We've accepted patches like this before -- what you can do in this case is to:
* upload with the review? flag (to indicate it needs someone to look at it), but no commit? flag (to indicate it's not been tested fully, so that the reviewer can see at a glance that this patch needs some additional attention)
* leave a comment stating exactly what you've said in this post

And someone with things set up can apply it and check it, etc.

Basically it's not a problem, so long as we know how much testing the patch has actually received and any known or potential issues.
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

[personal profile] fu 2011-09-09 06:59 am (UTC)(link)
Yeah, a lot of this needs root access. Good thought on mocking up data, though... I kinda like that idea, so I ran with it.

I've refactored the search worker, and then uploaded an additional patch to Bug 1847 which just returns as "search" results the latest 20 entries of the journal being searched, suitable for use with things like these...

[personal profile] the_wanlorn: I hope that helps you test your patch!
alierak: (Default)

[personal profile] alierak 2011-09-11 01:36 am (UTC)(link)
Oh, hmm, forgot about all that stuff. I actually do run gearman in my dreamhack, but it doesn't look like there's a relevant wiki page I can point you to. The one about setting up gearman appears to geared towards production sites and not dreamhacks.

I think what I did was something like this:

cd $LJHOME/cvs/gearman
perl Makefile.PL PREFIX=$LJHOME
make install


Then I chose a port nobody else was using (but I think the documented procedure probably ought to involve asking [personal profile] sophie to assign one) and started gearmand like this:

$LJHOME/bin/gearmand -p 17103 &


My config-local.pl has:

@GEARMAN_SERVERS = ( '127.0.0.1:17103' );


Let's see, I've also had to do this sort of thing for mogilefs, theschwartz, workers in general, memcached, and probably something else I'm forgetting. I have no doubt that it's possible to do the same for sphinx without needing root privileges, but it does seem like a bit of a bother.
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2011-09-12 09:23 am (UTC)(link)
Hmm, yeah seconding the ask the sysad (in this case, [personal profile] sophie).

Let me see if I can get her attention directed towards here!