IndexedSearch migration

This commit is contained in:
Len Kranendonk 2005-02-13 21:38:13 +00:00
parent 4f1524bd00
commit ccc36a78de
5 changed files with 51 additions and 27 deletions

View file

@ -94,6 +94,37 @@ sub getIcon {
return $session{config}{extrasURL}.'/assets/article.gif';
}
#-------------------------------------------------------------------
sub getIndexerParams {
my $self = shift;
my $now = shift;
return {
Article => {
sql => "select Article.assetId,
Article.linkTitle,
Article.linkURL,
asset.title,
asset.menuTitle,
asset.url,
asset.className,
asset.ownerUserId,
asset.groupIdView,
asset.synopsis,
wobject.description
from asset, Article
left join wobject on wobject.assetId = asset.assetId
where asset.assetId = Article.assetId
and asset.startDate < $now
and asset.endDate > $now",
fieldsToIndex => ["linkTitle" ,"linkURL","title","menuTitle","url","synopsis","description" ],
contentType => 'content',
url => 'WebGUI::URL::gateway($data{url})',
headerShortcut => 'select title from asset where assetId = \'$data{assetId}\'',
bodyShortcut => 'select description from wobject where assetId = \'$data{assetId}\'',
}
};
}
#-------------------------------------------------------------------
sub getName {