Skip to main content.
home | support | download

Back to List Archive

Re: Relative Newbie Swish-e indexing query

From: Bill Humphries <whump(at)not-real.apple.com>
Date: Thu Nov 21 2002 - 22:43:41 GMT
On Thursday, November 21, 2002, at 02:03 PM, Tref Gare wrote:

> Hi Folks.
>
> I'm indexing a directory of xml files only and to extract several
> specific fields from it that can then be displayed in the search
> results.
>
> I'm using the java wrapper jsp pages to display the results but I can't
> seem to fathom the process of getting the correct elements indexed and
> then pulling them out in the results.
>
> As far as I can tell what I need to do (and what I've tried to date) is
> the following:
> Add to the MetaNames parameter the names of the XML elements I'm after
> Add to the XMLClassAttributes the names of any attributes contained in
> those elements.
>
> Then define the params I want to use in the swishXML.cfg (and edit the
> JSP to access the correct cfg file).
>
> However to date I can't get any of the desired elements or attributes 
> to
> register.  I'm not sure whether this is an issue of them not being
> indexed correctly or an inability to extract them correctly from the
> index.

Tref,

This is the relevant part of what I'm using in my config file for 
indexing XML:

DefaultContents XML2
MetaNames title description swishdocpath
PropertyNames title date
UndefinedXMLAttributes ignore
PropertyNamesMaxLength 300 swishdescription
PropertyNameAlias swishdescription description

Where I'm indexing files which look like:

<?xml version="1.0" encoding="iso-8859-1"?>
<page>
    <title>About HRWeb</title>
    <date>1033348507</date>
    <description>
     We heard your feedback and have improved HRWeb. New menus, better 
search and easier to read content are some of the changes. Our goal is 
to make it as quick and easy as possible for you to find the HR 
information you need.</description>
	....
   </page>
Received on Thu Nov 21 22:44:11 2002