adding search engine

This commit is contained in:
JT Smith 2004-02-29 04:05:12 +00:00
parent 314d8daacb
commit ef8e8704c5
14 changed files with 535 additions and 3 deletions

View file

@ -108,6 +108,43 @@ sub generateResponseId {
return $session{scratch}{$varname};
}
#-------------------------------------------------------------------
sub getIndexerParams {
my $self = shift;
my $now = shift;
return {
Survey => {
sql => "select Survey_question.question as question,
Survey_question.Survey_questionId as Survey_questionId,
Survey.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,
Survey.groupToTakeSurvey as wobject_special_groupIdView
from wobject, page, Survey
left join Survey_question on Survey_question.Survey_id=Survey.Survey_id
where Survey.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 => ["question",
'select answer from Survey_answer where Survey_questionId = $data{Survey_questionId}' ],
contentType => 'wobjectDetail',
url => 'WebGUI::URL::append($data{urlizedTitle}, "func=view&wid=$data{wid}")',
headerShortcut => 'select title from wobject where wobjectId = $data{wid}',
bodyShortcut => 'select description from wobject where wobjectId = $data{wid}',
}
};
}
#-------------------------------------------------------------------
sub getIp {
my $self = shift;