The descriptions in the code are pretty blah. Especially:

When using table prefixing, enter a value like "tableprefix_" . When using separate databases, enter a value like "dbname." (no quotes, dot inclusive).

Cron TTL:
Define the limit in seconds of multisite re-indexing process, after NNN configured the multisite search will run a reindex

Yuck. Fix these strings!

Also improve the Table UX, and include an "edit" link.

Comments

daniel-san’s picture

Hey earthday47,

Thanks so much for the work you're doing on this and the help you are providing in the issue queue with my questions.

I can't really help in the code area of what you are doing, but I would like to offer my assistance in the new documentation that you are looking to add. I would be happy to try and come up with some clear directions on how to use this module from the user/site builder standpoint. I know that I was a bit stumped when starting out and I'd like to give back in some way that may help you, as well as others that will use your module.

Let me know what you think.

Dan

earthday47’s picture

Absolutely, I think that would be a great help. If you wanted to edit the README.txt file, that would be great too.

Perhaps you could edit that file and post it here? Then we can review? Or any ideas you have...

daniel-san’s picture

Sounds good.

I'm going to put it on my to-do list, but I may need a little bit of time to get it taken care of. I will really try and get it started this week.

earthday47’s picture

Made some progress on the admin table UI. I'm pretty excited that I was able to add draggable handles to the table!

Expect a commit to the 6.x-2.x-dev branch in the near future with a slick new admin UI!

daniel-san’s picture

I began writing information that would have been helpful for me to understand when starting to use Multisite Search. My hope is that this may be a helpful addition to the installation instructions for others who are starting out using this module and have no familiarity with prefixing tables and that you can run multisites off of one database. For several years, I only focused on the fact that you can run multisites off of one codebase and didn't even consider that you can run off of one database as well. If wanting to do that, someone would need to understand that prefixing the tables is key to this process.

Here is the start to the instructions that I've been working on.

Multisite Concepts
The ability to create multiple websites that run on a single Drupal codebase is very powerful, but there are different ways to set this up. One scenario is to have a single Drupal install with multiple sites in the Drupal 'sites' folder and multiple databases that run the different sites. Another way to set up multisites, is to have those multiple sites use the same single database as the main Drupal site. This sharing of a single database by the main site and the multiple subsites is how Multisite Search module is meant to be used.

Another key concept that may not be apparent to site builders who may be used to setting up separate databases for each of the subsets in their multisite setup, is the concept of prefixing. Prefixing allows you to add a term to the beginning of all the tables in the database of your website.

Standard Drupal tables:
access
actions

Prefixed Drupal tables:
mysite_access
mysite_actions

Prefixes are added during the Drupal install process. At the initial install page, add the normal necessary information;
Database name
Database Username
Database Password

To prefix the database, click the Advanced link and add in the prefix term you would like to add to the database tables. A common practice is to include an underscore at the end of the term.
Example: mysite_

Go ahead and provide feedback.

Dan

earthday47’s picture

Hi Dan,

I'm finally setting aside some time to work on this. I looked at your documentation, it's very good. I'm wondering if we can just supply a link to the already-written Multsite documentation?
http://drupal.org/node/43816

We could say something like this:

Multisite concepts
Drupal can be configured to run multiple websites from a single code base. To read more about multisite configuration, read the resources here: http://drupal.org/node/43816

Drupal database tables in a Multisite installation can be in separate databases, or in a single database using table prefixing.
**your explanation here**

I'd also just revise this line to be more accurate:

This sharing of a single database by the main site and the multiple subsites is how Multisite Search module is meant to be used.

To this:

Multisite Search has worked best when all sites use table prefixing, but separate databases are supported.

I think we could break some of this into an INSTALL.txt file. I wouldn't go too crazy though, since there's already Multisite information out there.

earthday47’s picture

Just so you know, I committed a HUGE amount of updates to the dev branch. Please test!

The UI is much, much better. You'll need to upgrade your database from 6.x-2.0 to 6.x-2.x-dev.

I didn't edit much of the text, though, so we'll keep this issue open for that task.

daniel-san’s picture

Very cool. Yea, I'm open to whatever works best to help the uninitiated like myself to better understand how to implement this module.

I will look to try and test the dev version very soon. It's going on my to-do list right now and I'll give feedback as soon as I can.

daniel-san’s picture

Two things in the documentation to look at:

first:

If you want all the sites to have Multisite Search, you must repeat steps 2-4 for each site."

There is no #4 in the README file.

Second:

ADVANCED CONFIGURATION - SHARE TABLES
Since doing the above for all sites is a major pain, you can also share the Multisite Search tables
and only need to do steps 2-4 once.

If you have shared tabled with the prefix 'shared_', you would add this to your settings.php file:
$db_prefix = array(
/* ..snip.. */
'multisite_search_dataset' => 'shared_',
'multisite_search_index' => 'shared_',
'multisite_search_sites' => 'shared_',
'multisite_search_total' => 'shared_',
);

Is this indicating that "shared_" is the main database prefix or is it a completely other database? Not sure this is clear. I am thinking I want to use this in my configuration of my sites so that I don't have to setup all the subsites with all the other sites, but I'm not sure what this sections means.

Dan

earthday47’s picture

Version: 6.x-2.x-dev » 6.x-2.1
Status: Active » Needs review

Please install and test version 6.x-2.1. I rewrote the whole README.txt file. I think it's more straightforward. I'm recommending one way to install the module, sharing all the tables, rather than explaining that it can be done a number of ways. I also made a step by step install list.

INSTALLATION INSTRUCTIONS

1. Edit the settings.php file for all sites and share the Multisite Search tables (see above).

2. Copy the multisite_search/ files to sites/all/modules.

3. Enable Search and Multisite Search on all sites. Because of step 1, you will get database errors.

4. Visit Site configuration -> Multisite configuration or admin/settings/multisite-search/sites on
any of the sites.

5. Add each site and its information. (See "Table Prefixing" below)

6. Re-build the search index for every site by visiting admin/settings/search on each site and
clicking "Re-index site".

7. Run cron for all sites.

8. If you want to replace core search, disable it at Site Building -> Themes -> Configure ->
Global Settings or admin/build/themes/settings/global. Then visit the Blocks page at
Site building -> Blocks or admin/build/block and move the "Multisite Search Block" to your
favorite region in your theme.

I hope it's more usable, but I'll leave it up to you guys to finally sign off on this.

daniel-san’s picture

Just got a chance to get back to this and it works fantastic. Used the latest 6.x-2.2 version.

I have three sites like the following:
A. Site 1 (main drupal install)
i. Site 2 (multisite subsite)
ii. Site 3 (multisite subsite)

Each has their own database.

Like the instructions state, I added the following to each settings.php with my main site's db name in place of shared_db, of course:

$db_prefix = array(
  'default' => '',
  'multisite_search_dataset'  => 'shared_db.',
	'multisite_search_index'    => 'shared_db.',
	'multisite_search_sites'    => 'shared_db.',
	'multisite_search_total'    => 'shared_db.',
	'multisite_search_settings' => 'shared_db.',
);

During this step of the directions, I just guessed that I was supposed to add it to the main site's settings.php as well. It worked with it that way, so I'm assuming I was supposed to do that. May want to include that the site that is sharing the database is included in this step as well. Maybe others wouldn't second guess it, but I did.

I was totally impressed that after setting up all the sites in the Multisite Search configuration section, they all showed up in the subsites. That was just awesome and made the process so much easier! Nicely done.

I will explore some more as to how I will implement the module in my live sites very soon. Great work and hope I'm helping in some small way.

Dan

earthday47’s picture

Really glad to hear it! Yes, I was very happy with how the new admin UI turned out. :)
Now I just need to get a D7 version up there... yikes...

earthday47’s picture

Version: 6.x-2.1 » 7.x-1.x-dev

Moving to 7.x branch. May still want to incorporate some of these ideas.