From 8e52f79717d679d6f823642191f0f2f8f5cd619a Mon Sep 17 00:00:00 2001 From: Len Kranendonk Date: Sun, 16 Jan 2005 09:51:50 +0000 Subject: [PATCH] Updated Search Indexer definition --- lib/WebGUI/Asset/Wobject/DataForm.pm | 63 +++++++++++----------------- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/DataForm.pm b/lib/WebGUI/Asset/Wobject/DataForm.pm index 6e4658d95..853481c33 100644 --- a/lib/WebGUI/Asset/Wobject/DataForm.pm +++ b/lib/WebGUI/Asset/Wobject/DataForm.pm @@ -258,50 +258,35 @@ sub getIndexerParams { sql => "select DataForm_field.label as label, DataForm_field.subtext as subtext, DataForm_field.possibleValues as possibleValues, - DataForm_field.wobjectId as wid, + DataForm_field.assetId as assetId, DataForm_field.DataForm_fieldId as fid, - wobject.namespace as namespace, - wobject.addedBy as ownerId, - page.urlizedTitle as urlizedTitle, - page.languageId as languageId, - page.pageId as pageId, - page.groupIdView as page_groupIdView, - wobject.groupIdView as wobject_groupIdView, - 7 as wobject_special_groupIdView - from DataForm_field, wobject, page - where DataForm_field.wobjectId = wobject.wobjectId - and wobject.pageId = page.pageId - and wobject.startDate < $now - and wobject.endDate > $now - and page.startDate < $now - and page.endDate > $now", + asset.ownerUserId as ownerId, + asset.url as url, + asset.groupIdView as groupIdView + from DataForm_field, asset + where DataForm_field.assetId = asset.assetId + and asset.startDate < $now + and asset.endDate > $now", fieldsToIndex => ["label", "subtext", "possibleValues"], - contentType => 'wobjectDetail', - url => '$data{urlizedTitle}."#".$data{wid}', + contentType => 'assetDetail', + url => 'WebGUI::URL::gateway($data{url})', headerShortcut => 'select label from DataForm_field where DataForm_fieldId = \'$data{fid}\'', - bodyShortcut => 'select subtext from DataForm_field where DataForm_fieldId = \'$data{fid}\'', + bodyShortcut => 'select subtext, possibleValues from DataForm_field where DataForm_fieldId = \'$data{fid}\'', }, DataForm_entryData => { - sql => "select distinct(DataForm_entryData.wobjectId) as wid, - wobject.namespace as namespace, - wobject.addedBy as ownerId, - page.urlizedTitle as urlizedTitle, - page.languageId as languageId, - page.pageId as pageId, - page.groupIdView as page_groupIdView, - wobject.groupIdView as wobject_groupIdView, - wobject.groupIdEdit as wobject_special_groupIdView - from DataForm_entryData, wobject, page - where DataForm_entryData.wobjectId = wobject.wobjectId - and wobject.pageId = page.pageId - and wobject.startDate < $now - and wobject.endDate > $now - and page.startDate < $now - and page.endDate > $now", - fieldsToIndex => ['select distinct(value) from DataForm_entryData where wobjectId = \'$data{wid}\''], - contentType => 'wobjectDetail', - url => 'WebGUI::URL::append($data{urlizedTitle}, "func=view&entryId=list&wid=$data{wid}")', - headerShortcut => 'select title from wobject where wobjectId = \'$data{wid}\'', + sql => "select distinct(DataForm_entryData.assetId) as assetId, + asset.ownerUserId as ownerId, + asset.url as url, + asset.groupIdView as groupIdView, + asset.groupIdEdit as special_groupIdView + from DataForm_entryData, asset + where DataForm_entryData.assetId = asset.assetId + and asset.startDate < $now + and asset.endDate > $now", + fieldsToIndex => ['select distinct(value) from DataForm_entryData where assetId = \'$data{assetIid}\''], + contentType => 'assetDetail', + url => 'WebGUI::URL::append($data{url}, "func=view&entryId=list}")', + headerShortcut => 'select title from asset where assetId = \'$data{assetId}\'', } }; }