You are here:  » Searching separate PT installs

Support Forum



Searching separate PT installs

Submitted by thelegacy on Sat, 2010-01-02 00:14 in

Hi David,

I had thought that I have seen in the forum before the question of searching through separate PT installs, ie: www.mysite.com/womens/, www.mysite.com/mens/ etc.. from an initial (New PT) install at the root, and the same new installs in directories from that.

I have been toying with attempting a searchform at the root, searching the root install, and having a category (directory) drop-down option, to also enable users to search the specified directory while at the root install. Esentially opening up search from the root throughout each separate PT install.

Is this even possible?

Thanks in advance,

Ray

Submitted by support on Sat, 2010-01-02 10:13

Hello Ray,

Sure - that's possible, I have helped a number of users create a top level search form to query sub-installations. The approach that I recommend is not to actually attempt to merge search results, but instead to just show each category and the number of results in that category, being a link to the search results for their query within that category, for example the user might see:

Womens (28)
Mens (17)

etc.

It's straight forward but not particularly easy to document so if you could perhaps email me a link to your site, a copy of search.php from one of your sub-installations (so that I can make sure the exact same search code is used) i'll put a search form and handler script together for you to integrate into your site...

Cheers,
David.

Submitted by thelegacy on Sat, 2010-01-02 16:36

Thanks David, email sent with link and copy of search.php attached.

Submitted by thelegacy on Sun, 2010-01-03 20:26

Thanks for the mod here, seems to work as I expected, now, what do I need to add to include my top level site into the search. That, should be all.

Submitted by support on Mon, 2010-01-04 09:42

Hi Ray,

In terms of the user selecting the "top level" site from the drop-down box; how do you want to refer to it? I.e. what category name should the option use?

Cheers,
David.

Submitted by thelegacy on Thu, 2010-01-07 03:15

Well, I suppose that unless I take my top-level installation and place it into a whole new category/(directory) from the root, then it isn't possible to search the root installation itself.

Is this how it is, I have tried several variations of the root by adding the $sites[""] = ""; variable into the sitesearch page and form, but haven't retrieved anything but errors...lol

Submitted by support on Thu, 2010-01-07 09:36

Hi Ray,

On the contrary, it's certainly possible; I'm thinking about it more from a user experience point of view.

Is the top level site categorised in any way; or is it perhaps "Miscellaneous" which might make a suitable title?

Cheers,
David.

Submitted by thelegacy on Thu, 2010-01-07 21:03

David,

Yes, there are plenty of categories, problem is, there are more than I really want to use, instead of "Miscellaneous" how about "Clothing", as the major part of the feeds I use deal with products in this general category.
Just let me know what I need to do to make it happen.

Thanks in advance.

Submitted by support on Fri, 2010-01-08 13:22

Hello Ray,

I'll modify the last versions of the files I sent you to do this using "Clothing" - i'll email them to you shortly...

Cheers,
David.