Custom XSL - List of parameters?

dcampbell
Posts: 4
Joined: Wed May 21, 2008 4:41 pm

Custom XSL - List of parameters?

Post by dcampbell »

Hi, we are implementing a custom XSL for our search appliance. Is there a list somewhere of the possible parameters/variables we might include in the individual search result template?

We want to include Date and Author but can't figure out how to do so. It would help to know what fields the appliance captures and what they're called.

The "default" or sample XSL sheets provided don't appear to match the "canned" versions available or we'd just look at one that includes the Modification Date to see what it is called. Also is there any way to format the date?

Dana
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Custom XSL - List of parameters?

Post by jason112 »

> We want to include Date and Author but can't figure out
> how to do so. It would help to know what fields the
> appliance captures and what they're called.

Do you have any custom fields defined in your crawl? (i.e. are they shown in list/edit URLs for your pages?)

Parametric Fields (if you have a Parametric Appliance) or Additional Fields (if you have a non-Parametric Appliance) need to be defined first with the crawl before they can be output with the search.
dcampbell
Posts: 4
Joined: Wed May 21, 2008 4:41 pm

Custom XSL - List of parameters?

Post by dcampbell »

I figured we would add Additional Fields eventually, but initially wanted to know what default fields the appliance is already capturing and how to call them.
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Custom XSL - List of parameters?

Post by jason112 »

If you're using the result style of "XSL Stylesheet" and "Allow XML" is set to "Y", then you can do the following to see the raw XML:

* Perform a normal search
* in the resulting URL, change the url parameter "dropXSL=html" to "dropXSL=yes"

This will let you see what elements it produces on its own. The default stylesheet gives examples of how to display things like title and description.
dcampbell
Posts: 4
Joined: Wed May 21, 2008 4:41 pm

Custom XSL - List of parameters?

Post by dcampbell »

thanks - I read elsewhere on this site about that and couldn't get it to work until you reminded me that I had to have both "XSL stylesheet" AND allow XML set.

It worked, very helpful.
dcampbell
Posts: 4
Joined: Wed May 21, 2008 4:41 pm

Custom XSL - List of parameters?

Post by dcampbell »

following up for anyone who might come upon this thread later, there actually *IS* a list of the default fields Thunderstone uses. It's in a very helpful section of the manual (search.foo.org/applianceman )

Field Description
id Unique record id
Hash Document hash for duplicate content detection
Size Size of retrieved html document
Visited The date the page was modified (or fetched if modified not set)
Dlsecs The number of seconds to fetch the page
Depth The number of URLs traversed to reach the page
Url The URL of the real HTML page
Title The Title of the page
Body The textual content of the page, in UTF-8
Keywords The keywords meta data from the page
Description The description meta data from the page
Meta Other meta data from the page, separated by newlines
Catno List of categories to which the URL belongs
Modified The date the page was modified
NextCheck The date the page should next be refreshed
Views The number of times this URL has been viewed (shown in results)
Clicks The number of times this URL has been clicked (in results)
CTR Click-through ratio
Pop Popularity (number of pages linking to this page)
MimeType MIME type of original page (future use)
Charset Character set of original page (future use)
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Custom XSL - List of parameters?

Post by mark »

Those are the database fields. There are other items besides those in the XML. And I don't think all of the database fields are in the XML.
dorban
Posts: 31
Joined: Fri Sep 24, 2004 12:39 pm

Custom XSL - List of parameters?

Post by dorban »

If I look at the "List URLs" area I see a list of info displayed. One of which is "Description" that is pulled from the meta tags I'm using on my html pages. Is there a way to read this in instead of the "Abstract" parameter when it's not listed as "-none"?

Thanks,
D.
User avatar
jason112
Site Admin
Posts: 347
Joined: Tue Oct 26, 2004 5:35 pm

Custom XSL - List of parameters?

Post by jason112 »

The Search Setting "Abstract Style" allows you to choose "Description".
dorban
Posts: 31
Joined: Fri Sep 24, 2004 12:39 pm

Custom XSL - List of parameters?

Post by dorban »

That helps, but is there a way to show either both Description AND abstract, or to check to see for Description first, and if it's empty to show abstract? The Description is empty for .pdf files, etc. but is helpful for html pages...
TIA
Post Reply