Skip to main content.
home | support | download

Back to List Archive

MetaName grouping follow up

From: Bill Moseley <moseley(at)>
Date: Thu Feb 28 2002 - 15:03:12 GMT

So the question the other day was how should metaname grouping be designed?
 And the options were:

group during indexing:

   MetaNameGroup group author keywords comment

which just indexes all words found in author, keyword, and comment also
under "group" (so those words are indexed twice).

Or group while searching:

   -w author,keywords,comment=foo

Which is really short-hand for 

   -w author=foo or keywords=foo or comment=foo

Although the first would be easier to implement, I think we need the second
for this reason: we may want to be able to assign different ranks to the
individual metanames.

That syntax of

   -w author,keywords,comment=foo

is kind of nasty.  Swish's query parser is not very smart and it's always
been a pain when I'm in there.  So, it might still be easier to have a
configuration setting that defines the groups, but that are actually used
to match multiple metanames while searching.

Of course, there's always Perl.  To implement this in the swish.cgi script
would take about two changes:

In the config file do:

      groups => {
          keywords => [qw/ author keywords comment /],
          all      => [qw/ swishdefault author keywords comment publisher /],

then in the code

      $query = join ' OR ' map { "$_=$query" } @{$groups{$metaname}}
         if exists $groups{$metaname};

Now, that's easier.  But might break due to long command lines on Windows.

I suppose one reasonably easy hack^H^H^H^Hchange might be to allow -w *=foo
to match any metanames.

Bill Moseley
Received on Thu Feb 28 15:08:29 2002