Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Index table?

Quote Reply
Index table?
What happened to the Index table?

It was dropped in the upgrade, but nothing replaced it. I get an error on re-index:

Quote:

Search (23056): Fatal: remove_all: Can't execute: DELETE
FROM Links_Word_Index (Table 'Links.Links_Word_Index' doesn't exist) at Links/DBSQL.pm line 1546

and I can't find a definition for that table anywhere....

Same for Links.Scores

[This message has been edited by pugdog (edited November 10, 1999).]
Quote Reply
Re: Index table? In reply to
When you ran setup.cgi did you get an error when you saw:

Creating Search Indexes ...

?

Cheers,

Alex
Quote Reply
Re: Index table? In reply to
Also, you may want to try setting $DEBUG = 2 in DBSQL.pm. That will cause fatal error and print warnings on any bad SQL.

Cheers,

Alex
Quote Reply
Re: Index table? In reply to
Ok... I managed to create them from the search.pm file....

It looks like this is supposed to create, drop and re-create the tables each time. It doesn't.

The tables are also not created on installation....

Quote Reply
Re: Index table? In reply to
No, alex.

Those tables are _not_ in the setup.cgi/SQL.mysql scripts.

What scripts are they to be set up in?
Quote Reply
Re: Index table? In reply to
I had to add the following to the SQL.mysql script to get it to work:

Code:
# SCORES TABLE
# =============================================================================
# Table structure for table 'Links_Scores_Index'
#

$Links_Scores_Index = qq~
CREATE TABLE Links_Scores_Index (
WordID mediumint(8) unsigned DEFAULT '0' NOT NULL,
item int(11) DEFAULT '0' NOT NULL,
score smallint(5) unsigned DEFAULT '0' NOT NULL,
position mediumint(8) unsigned DEFAULT '0' NOT NULL,
KEY WordID (WordID),
KEY item (item)
)
~;

# WORDS TABLE
# =============================================================================
# Table structure for table 'Links_Word_Index'
#

$Links_Word_Index = qq~
CREATE TABLE Links_Word_Index (
WordID mediumint(8) unsigned DEFAULT '0' NOT NULL auto_increment,
Word varchar(50) NOT NULL,
Frequency smallint(5) unsigned,
PRIMARY KEY (WordID),
UNIQUE Word (Word)
)
~;

%TABLES = (
Links => $Links, Category => $Category, Search_Log => $Search_Log,
CategoryHeiarchy => $CategoryHeiarchy, CategoryRelations => $CategoryRelations,
CategoryAlternates => $CategoryAlternates, Validate => $Validate, Users => $Users,
Sessions => $Sessions, Editors => $Editors, Subscribe => $Subscribe, Hits_Track => $Hits_Track,
Rate_Track => $Rate_Track, Build_Update => $Build_Update, Verify => $Verify,
Links_Word_Index => $Links_Word_Index, Links_Scores_Index => $Links_Scores_Index
);

Obviously, I only added the last two items to the HASH.

(Btw... when creating the tables, they weren't created, but when DROPPING them I got an error "Table doesn't exist" so there was a mix-match between the create and drop scripts I got).

[This message has been edited by pugdog (edited November 10, 1999).]