The Wayback Machine - https://web.archive.org/all/20050719074727/http://www.picosearch.com:80/faqs/faq_partitions.html
PicoSearch FAQ: Search Partitions
homeplanssignupregistered userscontact ushelpabout PicosearchPicosearch news
Help with Picosearch
> FAQs
> New Features
> What is Picosearch?
> Picosearch Glossary
> Sample Customers
> License



Can I divide my search engine into several different sections (partitions)?

Yes! You can segment your PicoSearch index into several subsections, called partitions. Each partition can be selected for searching from a dropdown menu. This is a great feature, because with it you can maximize your page limits, and give your users the effect of several search engines in one. You can make the first and default choice be to search your entire site, but have other sections that search only FAQs or user feedback or even another site altogether. For a quick demonstration on our what's new pages, see What's New? Partitions!.
 
To define and manage your partitions, go to the Search Partitions control of your account manager's Indexing topics. Partitioning is an indexing activity, so whatever changes you make must be followed by a reindexing of your account. In essence, PicoSearch is managing in the background for you the insertion and retrieval of unique codes for the documents of each partition, so that these documents may be singled out immediately to be searched within as a set.
 
The search results pages will give the options for changing the partition being searched, or you can keep the user within the partition that they started from. The first call to PicoSearch from your web page can let the partitions appear naturally, or force the launched partition, or completely override any mention of partitions, so you can indeed have different search engines seen from different pages of your site. This can therefore be a good way to handle searching different language sections of a multilingual site; see How can I use more than one display language? Templating customers with paying accounts may also wish to then tailor their templates for different search launches; see What codes can I use in my template to further customize my search results?
 
For each partition of your search, you need to provide in your account manager a keyname with no spaces, display string which can have spaces, and the files and/or directories to search. Here's an example to get you started:
partitionALL:"Search our Site"
partitionFAQs:"Search the FAQs"
http://www.mysite.com/faqlist_file.html
http://www.mysite.com/faq_directory/
Special keyname ALL will set the first partition to search all files, so no path specs are required. "Search our Site" is what your users will see in the drop-down selection for this choice, which as the first will be the default. FAQs will be the keyname of the second partition, "Search the FAQs" is what your users will see as the drop-down selection, and the left-to-right matching specifications should be chosen to include all of your FAQ files. In this example, faqlist_file.html would represent the site's master list of all FAQ links (maybe you wouldn't want it in the search or maybe you would), and each FAQ file is located under the faq_directory.
 
Now for some more complex additional examples:
partitionTXT:"Search all text files"
*txt
partitionMTXT:"Search new meeting text files"
*meeting*txt
-*old*txt
Advanced patterns using * and - are shown for text file partitions. "Search all text files" uses a left-most star to include all files of a certain extension; in the example, the TXT partition for *txt will search all .txt files. "Search new meeting text files" uses two stars, one to catch any 'meeting' (perhaps in the file name or directory name) and one for the 'txt' extension. Furthermore, a minus sign can be used to exclude from a partition, and thus -*old*txt will not include any path with the word 'old', even if it matched the *meeting*txt pattern.

Obviously, you can confuse yourself with such complex patterns, but they are powerful! Also note that the minus sign only excludes, it does not include; therefore to include all but certain files use http* first to get all, then -http://etc. to exclude the certain files.
 
As the examples suggest, the same file can belong to more than one partition (especially note that all files belong to the ALL partition). You don't even have to list every file for a partition in its definition, because individual files can also join partitions using the PICOPARTITION tag in their HTML. Here is the code that you would insert into any additional files that should go in the FAQs partition:
<!-- PICOPARTITION FAQs -->
The order of partitions in your specs determines the order of drop-down choices. A drop-down box will be generated on your results pages for you. How you wish to present the partition choices on your own website is up to you. See "How to Add a Search Box" in your account manager for the basic drop-down box code once you have turned on your partitions. You also can choose whether to suppress the dropdown box in your results by having the current partition only mentioned in the results, or have it not mentioned at all. These options are also in your account manager, under the partition definition that you have entered. You won't have to reindex to just change those, so you can go back and forth from test searches to see which display options you prefer.
 
The following are the override tricks you can play from your web pages. Just insert these optional lines into your cut-and-paste search box code. An example partition keyname would be FAQS for a partition definition of partitionFAQS:"Search the FAQS", ie. do not include the word 'partition'.
  • To force the partition selection without a user choice:
    <INPUT TYPE="HIDDEN" NAME="psel" VALUE="(insert your partition keyname here)">
     
  • To hide the partition on the results pages:
    <INPUT TYPE="HIDDEN" NAME="phide" VALUE="1">
If you have text links to PicoSearch from your web pages, such as a help link or a one-click entrance link, the URL equivalents for the overrides involve adding for example "&psel;=FAQs" and/or "&phide;=1" to the end of the link. For example, with the one-click entrance you have "ts0.pl?index=123456", where 123456 is your account ID. Thus you add:
<a href="http://www.picosearch.com/cgi-bin/ts0.pl?index=123456&psel;=FAQs&phide;=1>search</a>
For Professional and Premium Accounts only:
If you have supplied a custom search box in your template and you are using partitions with it, you will want to add _SEL_nameofpartition by itself within each OPTION tag in the partition dropdown's SELECT statements, like this: <OPTION value="area1" _SEL_area1>. These will be replaced automatically by PicoSearch to mark the current partition as SELECTED, so the user will see the same partition being continued in a dropdown selection. This is the method by which the partitioned and customized Search our Site box on the PicoSearch homepage is kept current with the user's choice - try it!

Back to FAQs

Patents Pending. Copyright © Picosearch LLC