Updated Search Indexer definition

This commit is contained in:
Len Kranendonk 2005-01-16 09:33:04 +00:00
parent a60e4a5262
commit 076715697e

View file

@ -290,32 +290,25 @@ sub getIndexerParams {
my $now = shift; my $now = shift;
return { return {
Survey => { Survey => {
sql => "select Survey_question.question as question, sql =>"select Survey_question.question as question,
Survey_question.Survey_questionId as Survey_questionId, Survey_question.Survey_questionId as Survey_questionId,
Survey.wobjectId as wid, asset.className as class,
wobject.namespace as namespace, asset.ownerUserId as ownerId,
wobject.addedBy as ownerId, asset.url as url,
page.urlizedTitle as urlizedTitle, asset.assetId as assetId,
page.languageId as languageId, asset.groupIdView as groupIdView,
page.pageId as pageId, Survey.groupToTakeSurvey as special_groupIdView
page.groupIdView as page_groupIdView, from Survey, asset
wobject.groupIdView as wobject_groupIdView,
Survey.groupToTakeSurvey as wobject_special_groupIdView
from wobject, page, Survey
left join Survey_question on Survey_question.Survey_id=Survey.Survey_id left join Survey_question on Survey_question.Survey_id=Survey.Survey_id
where Survey.wobjectId = wobject.wobjectId where Survey.assetId = asset.assetId
and wobject.pageId = page.pageId and asset.startDate < $now
and wobject.startDate < $now and asset.endDate > $now",
and wobject.endDate > $now
and page.startDate < $now
and page.endDate > $now",
fieldsToIndex => ["question", fieldsToIndex => ["question",
'select answer from Survey_answer where Survey_questionId = \'$data{Survey_questionId}\'' ], 'select answer from Survey_answer where Survey_questionId = \'$data{Survey_questionId}\'' ],
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 => '$textToIndex'
} }
}; };
} }