[dw-free] Fix search. I renamed the index from test1 to dw1. This also fixes a bug where no excerpts
[commit: http://hg.dwscoalition.org/dw-free/rev/cbef12206273]
Fix search. I renamed the index from test1 to dw1. This also fixes a bug
where no excerpts are returned causing the worker to crash. That's silly; if
we have search results we should show what we have instead of crash.
Patch by
mark.
Files modified:
Fix search. I renamed the index from test1 to dw1. This also fixes a bug
where no excerpts are returned causing the worker to crash. That's silly; if
we have search results we should show what we have instead of crash.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- bin/worker/sphinx-search-gm
-------------------------------------------------------------------------------- diff -r e305fa52fc08 -r cbef12206273 bin/worker/sphinx-search-gm --- a/bin/worker/sphinx-search-gm Sun Aug 30 15:16:04 2009 -0500 +++ b/bin/worker/sphinx-search-gm Mon Aug 31 09:03:41 2009 +0000 @@ -89,7 +89,7 @@ sub sphinx_search { # FIXME: this should use some other index name than 'test1' heh, and we should probably # try to figure out the language of the journal being searched (or the searcher?) and use # an appropriate stemming library? (future expansion opportunity) - my $exc = $sx->BuildExcerpts( [ map { $_->{entry} } @out ], 'test1stemmed', $args->{query}, {} ); + my $exc = $sx->BuildExcerpts( [ map { $_->{entry} } @out ], 'dw1stemmed', $args->{query}, {} ) || []; # if we have a matching number of excerpts to events, then we can determine # which one goes with which post. --------------------------------------------------------------------------------