Skip to main content.
home | support | download

Back to List Archive

Re: searching XML documents

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Mon Apr 05 2004 - 16:35:07 GMT
On Mon, Apr 05, 2004 at 07:37:15AM -0700, Peter Karman wrote:
> all text is indexed under SOME metaname (as Bill noted). If you want a 
> default search to look in all metanames, or a specific metaname, you 
> need to do something like this:
> XML:
> <record>
> 	<title>foo</title>
> </record>
> 
> config:
> UndefinedMetaTags auto
> MetaNameAlias swishdefault record
> 
> then a search for
> 
> swish-e -w foo
> or
> swish-e -w title=foo
> 
> should both work.
> 
> Bill, please correct me if I'm wrong.

Almost -- need to tell swish to index xml:

moseley@laptop:~$ cat c
DefaultContents XML2
UndefinedMetaTags auto
MetaNameAlias swishdefault record

moseley@laptop:~$ swish-e -c c -i xml -v0 -T indexed_words
    Adding:[1:swishdefault(1)]   'foo'   Pos:3  Stuct:0x1 ( FILE )
    Adding:[1:title(11)]   'foo'   Pos:3  Stuct:0x1 ( FILE )



-- 
Bill Moseley
moseley@hank.org
Received on Mon Apr 5 09:35:08 2004