I've done this by having two separate configs and then using htmerge to merge both results sets into a third. This allows my users to pick A, B, or ALL when searching. Note that they can only pick ONE config to use while searching.

Take a look at htdig -d and htdig -m.

Hope this helps.


On 7/5/07, Bruce DeYoung < > wrote:

I asked this question a week or so ago and received no input, so thought I'd ask it again....but in a different way.

I am indexing multiple domains (i.e., ) and want to have some flexibility in allowing my end users the ability to search all the indexed content, or to search one or the other domain individually.    I've played around with this for a while now and am able to successfully index the content using a separate config file for each domain.   My thought has been to then use the search form to allow the user to search both domains or a single domain using a checkbox and setting the appropriate "config" option based upon their selection.

At this point, I have the config files defined and am able to index content from the domains into separate dbs.   And, I can search and successfully return results if I search 1 of the dbs (configs) at a time.   However, if I search while referencing both dbs (configs), the URLs returned are all mangled.    

Here's a URL returned when searching for the term JIT from domain1 using htsearch from the command line:

<a href=" ">User Guide: QAD JIT Sequencing </a>

Here's a URL returned when searching for the term JIT from domain2 using htsearch from the command line:

<a href="">QAD | ServiceLinQ | Downloads | EDI ECommerce Trading Partner Library</a>

And here's a URL returned when searching for the term JIT from combined domain1 and domain2 using the following form elements (can't figure out how to reference two config files on the htsearch command line);

<a href="http://support-dev2.qad.comhttp://planner/Planner_UG.pdf ">User Guide: The Planner</a>   (This URL is mangled and cannot be followed successfully....)

....and the form used for searching.....

     <form method="get" action="/cgi-bin/bin/htsearch.cgi">
     <input type="text" size="30" name="words">

     <input type="hidden" name="restrict" value="">
     <input type="hidden" name="format" value="long">
     <input type="hidden" name="sort" value="revtitle">
     <input type="hidden" name="protected_icon" value="false">
     <input type="hidden" name="pdf_icon" value="false">
     <input type="hidden" name="narrowsearch" value="0">
     <input type="hidden" name="config" value="htdig-catchall">
     <input type="hidden" name="config" value="htdig-documentation">
     <input type="submit" value="Search Everything">

Any ideas on what I may be doing wrong?   Is it possible to search multiple domains from multiple configs/dbs (or multiple domains from a single config/db for that matter)?

I would really appreciate some input if you have it.



This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
ht://Dig general mailing list: <>
ht://Dig FAQ:
List information (subscribe/unsubscribe, etc.)