Migrated Indexer params to new asset model

This commit is contained in:
Len Kranendonk 2005-02-13 08:20:29 +00:00
parent 268c1cd8ba
commit fb76d727b1

View file

@ -257,44 +257,40 @@ sub getIndexerParams {
my $now = shift; my $now = shift;
return { return {
Product => { Product => {
sql => "select Product.wobjectId as wid, sql => "select Product.assetId,
Product.image1 as image1, Product.image1,
Product.image2 as image2, Product.image2,
Product.image3 as image3, Product.image3,
Product.brochure as brochure, Product.brochure,
Product.manual as manual, Product.manual,
Product.warranty as warranty, Product.warranty,
Product.price as price, Product.price,
Product.productNumber as productNumber, Product.productNumber,
Product_benefit.benefit as benefit, Product_benefit.benefit,
Product_feature.feature as feature, Product_feature.feature,
Product_specification.name as name, Product_specification.name,
Product_specification.value as value, Product_specification.value,
Product_specification.units as units, Product_specification.units,
wobject.namespace as namespace, asset.ownerUserId as ownerId,
wobject.addedBy as ownerId, asset.url,
page.urlizedTitle as urlizedTitle, asset.groupIdView,
page.languageId as languageId, asset.title,
page.pageId as pageId, asset.menuTitle,
page.groupIdView as page_groupIdView, asset.className,
wobject.groupIdView as wobject_groupIdView, asset.synopsis
7 as wobject_special_groupIdView from Product, asset
from Product, wobject, page left join Product_benefit on Product_benefit.assetId=Product.assetId
left join Product_benefit on Product_benefit.wobjectId=Product.wobjectId left join Product_feature on Product_feature.assetId=Product.assetId
left join Product_feature on Product_feature.wobjectId=Product.wobjectId left join Product_specification on Product_specification.assetId=Product.assetId
left join Product_specification on Product_specification.wobjectId=Product.wobjectId where Product.assetId = asset.assetId
where Product.wobjectId = wobject.wobjectId and asset.startDate < $now
and wobject.pageId = page.pageId and asset.endDate > $now",
and wobject.startDate < $now
and wobject.endDate > $now
and page.startDate < $now
and page.endDate > $now",
fieldsToIndex => ["image1", "image2", "image3", "brochure", "manual", "warranty", "price", fieldsToIndex => ["image1", "image2", "image3", "brochure", "manual", "warranty", "price",
"productNumber", "benefit", "feature", "name", "value", "units"], "productNumber", "benefit", "feature", "name", "value", "units"],
contentType => 'wobjectDetail', contentType => 'assetDetail',
url => 'WebGUI::URL::append($data{urlizedTitle}, "func=view&wid=$data{wid}")', url => 'WebGUI::URL::gateway($data{url})',
headerShortcut => 'select title from wobject where wobjectId = \'$data{wid}\'', headerShortcut => 'select title from asset where assetId = \'$data{assetId}\'',
bodyShortcut => 'select description from wobject where wobjectId = \'$data{wid}\'', bodyShortcut => 'select synopsis from asset where assetId = \'$data{asssetId}\'',
} }
}; };
} }