fixing search bugs

This commit is contained in:
JT Smith 2004-02-29 20:42:12 +00:00
parent 2d28c61ec4
commit 835292986a
4 changed files with 23 additions and 10 deletions

View file

@ -116,12 +116,17 @@ sub www_edit {
}
# Index to use
$properties->radioList( -name=>'indexName',
-options=>\%indexName,
-label=>WebGUI::International::get(5,$self->get("namespace")),
-value=>$self->getValue("indexName"),
-vertical=>1
);
# $properties->radioList( -name=>'indexName',
# -options=>\%indexName,
# -label=>WebGUI::International::get(5,$self->get("namespace")),
# -value=>$self->getValue("indexName"),
# -vertical=>1
# );
# NOTE: For now we're limiting each site to one index. Will allow more in the future.
$properties->hidden(
-name=>"indexName",
-value=>"IndexedSearch_default"
);
# Page roots
%searchRoot = ( 'any'=>WebGUI::International::get(15,$self->get("namespace")),

View file

@ -16,6 +16,7 @@ package WebGUI::Wobject::IndexedSearch::Search;
use strict;
use DBIx::FullTextSearch;
use WebGUI::DateTime;
use WebGUI::SQL;
use WebGUI::URL;
use WebGUI::HTML;
@ -436,7 +437,8 @@ sub indexDocument {
headerShortcut,
bodyShortcut,
contentType,
ownerId )
ownerId,
dateIndexed )
values ( ".
($document->{docId} || $self->{_docId}).", ".
quote($self->getIndexName).", ".
@ -451,7 +453,8 @@ sub indexDocument {
quote($document->{headerShortcut})." ,".
quote($document->{bodyShortcut})." ,".
quote($document->{contentType})." ,".
($document->{ownerId} || 3)." )"
($document->{ownerId} || 3).",
".WebGUI::DateTime::time()." )"
);
$self->{_docId}++;
}