[wp-hackers] Search API and Sphinx
Edward Dale
scompt at scompt.com
Fri Jun 4 19:15:54 UTC 2010
>> I haven't seen much talk about the search API [1]. It looks like it's
>> going to be integrated into the core in 3.0 [2]. Is that going to make
>> it into the release? If so, does anyone know if the Sphinx plugin [3]
>> is going to work with it?
>
> The search API project did not make it into 3.0. However, a new filter
> introduced in 3.0 made it easier to plug in other search systems: the
> posts_search filter in wp_query::get_posts.
> ...
> I don't have any plans to update the Sphinx plugin to work this way.
Would this be the basic structure of a Sphinx plugin that worked with 3.0?
function my_posts_search($v) {
if(is_search()) {
// get all the post ids from sphinx that match get_query_var('s')
// return " AND id IN ($ids)
}
return '';
}
Outside of that function, the majority of the work in the plugin would
be to get the data into Sphinx, right?
Cheers,
Edward
More information about the wp-hackers
mailing list