Changeset 440
- Timestamp:
- 10/05/07 18:06:41 (1 year ago)
- Files:
-
- EstCrawler/trunk/EstCrawler/EstCrawler.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
EstCrawler/trunk/EstCrawler/EstCrawler.pl
r439 r440 245 245 my $cdate = ts2iso($entry->blog, $entry->authored_on); 246 246 my $mdate = ts2iso($entry->blog, $entry->modified_on); 247 my $categories = join('', map { '[' . $_->label . ']' } @{$entry->categories}) 248 if $entry->categories; 249 my $tags = join('', map { '[' . $_ . ']' } $entry->tags) 250 if $entry->tags; 247 251 248 252 # metainfo (attribute, not searchable) … … 252 256 $doc->add_attr('@cdate', $cdate); 253 257 $doc->add_attr('@mdate', $mdate); 258 $doc->add_attr('entry_id', $entry->id); 259 $doc->add_attr('blog_id', $entry->blog_id); 260 $doc->add_attr('categories', $categories) if $categories; 261 $doc->add_attr('tags', $tags) if $tags; 254 262 255 263 # document body (searchable) … … 260 268 $doc->add_hidden_text($title); 261 269 $doc->add_hidden_text($author); 262 $doc->add_hidden_text( join(', ', map { $_->label } @{$entry->categories})|| '');263 $doc->add_hidden_text( join(', ', $entry->tags)|| '');270 $doc->add_hidden_text($categories || ''); 271 $doc->add_hidden_text($tags || ''); 264 272 $doc->add_hidden_text(remove_html($entry->keywords) || ''); 265 273 $doc;
