Skip to main content.
home | support | download

Back to List Archive

Re: Re: Multiple indexes

From: David Norris <dave(at)>
Date: Thu Mar 16 2000 - 23:35:18 GMT
Ron Samuel Klatchko wrote:
> >     Can I make a search using multiple index files?
> Yes you can, but searching multiple indices doesn't behave as people
> often expect it to (as one logical index).

I posted a replacement search.c (for 1.3.3; really very minor changes)
to the list some time back (around August 99) that partially addresses
the unexpected behavior of maxhits.  (I think that is what Ron refers to
here.)  The search script can really play nice with the results and emit
a categorized listing (similar to a YAHOO search)!  The script would
have to watch for the comment lines and emit info based on certain
comment fields.  Basically, maxhits of 20 returns the top 20 results for
each index on the command line (5 indices x 20 results = 100 results). 
I can explain further if this is how you want to do it.

> Another option would be to merge all the indices into a single index.
> This can be done with the -M flag.

This certainly would be the only way to get (swish-e) sorted results for
the entire site.  Which may be more or less desirable depending on the
situation.  The only draw back to this would be a tiny bit of extra disk
space and maybe slightly skewed ranking.  This is how I search 'all of
my site' (even though I hacked my search.c to handle maxhits
differently).  I actually just run the indexer one more time and have it
do the whole site.  It's redunant, but, the ranking seems to be better. 
>From the looks of the daily logs my entire cron job takes about 25
seconds (running all 5 or so indices in parallel at nice 20) to index
around maybe 1000 files of 30KB or so per file.

,David Norris
  Open Server Architecture Project -
  Dave's Web -
  ICQ Universal Internet Number - 412039
  E-Mail -
Received on Thu Mar 16 15:32:14 2000