Skip to main content.
home | support | download

Back to List Archive

Re: Improving SwishDescriptions

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Fri Dec 09 2005 - 15:59:13 GMT
andy rosbrook scribbled on 12/9/05 9:30 AM:

> StoreDescription HTML <body> 300
> StoreDescription XML <body> 300
> StoreDescription HTML2 <body> 300
> StoreDescription XML2 <body> 300
> 

increase your StoreDescription to something much larger. That only grabs the 
first 300 characters in the file (usually that's <50 words...).
> 
> If i were to search for 'car' in a normal html document, the description 
> returned seems to be just pulled from the top of the body and not focused 
> around the keyword as you would think, usual description is:
> 

yes. if no match is found in the property text, the first N chars are returned.


> any ideas on how i can improve descriptions? My only idea was to grab a huge 
> description and chop it down manually with perl 100 words either side of the 
> first occurence of the search term.
> 

see my SWISH::HiLiter Perl module on CPAN for code that does that snipping of 
contextual text. It also will highlight search terms in the snippet.

-- 
Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com
Received on Fri Dec 9 07:59:14 2005