Skip to main content.
home | support | download

Back to List Archive

Re: Including meta tags in field and default keyword search

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Tue Sep 28 2004 - 13:52:09 GMT
On Mon, Sep 27, 2004 at 11:03:45PM -0700, PFinch@cch.com.au wrote:
> I'm trying to get data in a meta tag to be searchable as part of a
> default query and as part of a field query. However, the moment
> I define the meta tag, using MetaNames, it no longer appears in
> the default search. e.g.

The secret about swish is there is no "default" search -- only
specific meta tag searches.  Think of them as columns in a database.
If you want to search multiple columns in a database you either have
to specify both columns or place your data in more than one column.


So, to have things searchable in more than one metaname you have two
options:

1) like you said, you can search both at the same time:

     swishdefault=(Australian) or booktitle=(Australian)

but that's two lookups in the index.

2) Or you can nest your data:

In XML you would do:

    <xml>
        <all>
            <booktitle>
                Australian Employment Law Guide
            </booktitle>

            <keywords>
                During a period of stand-down
            </keywords>

            Give the employee all you can afford.
        </all>
    </xml>

And then use: 

    metanames all booktitle keywords


Of course, you are making your index slightly larger in that case.
(BTW -- 


The swish parser will actually allow you to use fake HTML tags as
metanames -- so in broken HTML you can do this:

    <html>
      <head>
        <title>Payment while stood down</title>
      </head>
      <body>
            Give the employee all you can afford.

            <booktitle>
                Australian Employment Law Guide
            </booktitle>

            <keywords>
                During a period of stand-down
            </keywords>
      </body>
    </html>

and with this you would use:

    MetaNameAlias swishdefault body
    metanames booktitle keywords

or maybe

    metanames body booktitle keywords

Of course, you probably don't find those a very good format for your
web pages.  If you content is in a database then the XML layout might
be best.  Otherwise, you will likely have to pre-parse your HTML files
and reformat while indexing.

> BTW... does MetaNamesRank work in any version of Swish?

To some small degree.

-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Tue Sep 28 06:52:29 2004