[wp-hackers] Searching across entire multisite network with Sphinx

Otto otto at ottodestruct.com
Thu Jul 22 18:38:08 UTC 2010


Your basic problem is that you can't do wildcards in a table name. And
since each site has its own set of tables, this is a problem for
pulling in their data. The only real solution is to first have it pull
the list of tables using SHOW TABLES or similar, then loop through
those to build your table names outside of SQL.

I am not familiar with Sphinx, and so I can't tell you how to do that exactly.

One approach might be to make a combined View of all your post tables
so that Sphinx can access them all as if they were one table.

-Otto



On Wed, Jul 21, 2010 at 11:31 AM, Daniel Bachhuber
<danielbachhuber at gmail.com> wrote:
> Hey all,
> I'm in the process of setting up a new WordPress 3.0 multisite instance and would like to have search on the main site query across all of the sites in the network.
>
> Initially, my thought was to use Sphinx, and the WP Sphinx Search plugin, but I've run into a significant issue in that I can't dynamically add new sites to the mix. It's detailed more in depth here:
>
> http://stackoverflow.com/questions/3301145/configuring-sphinx-to-index-a-dynamic-set-of-tables
>
> My question for the WordPress crowd, however, is this: is there a better way to offer search across all of the sites on the network?
>
> Ideally, this would be a self-hosted solution that I could performance tune, also supported the different BuddyPress content types (members, groups, activity updates, etc.), and was agnostic about custom domain mapping as some sites will be a subdomain of the primary site while others will be on their own domain.
>
> Thanks much in advance,
>
> Daniel
>
> --
> Daniel Bachhuber
> danielbachhuber.com
> danielbachhuber at gmail.com
> +1 (971) 998-5407
> aim/skype/twitter: danielbachhuber
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list