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

Searching/Keywords

Quote Reply
Searching/Keywords
Alex,

Is LinkSQL indexing the "Keywords" field? Looking at my database, it doesn't look like it is, and I don't see any flags on how to adjust it. Searches (single words) that are returning dozens of hits in the 2.0 version, return only the few where the term was used in the description field.

Also, it's indexing funny combinations of characters. "_JUST_" is being inserted as an indexed term, as are "I<B" and "<P" where HTML tags were used in the descriptions.

I'd like to enforce a rule such that anything between <..> tags is not indexed. Where would I go to do that?
Quote Reply
Re: Searching/Keywords In reply to
Do you mean the Meta_Keywords in the Category table, or is Keywords a new field you added in the Links table?

To change which fields you want indexed, simply edit the .def file (or use the table maint tool) and set the indexed value > 0 (indexed is the last column).

The number represents the score as you can return results ordered by relevance, with hits in the title worth more then hits in the description.

As for the indexing, can you email me some sample records that are not getting indexed properly?

Cheers,

Alex
Quote Reply
Re: Searching/Keywords In reply to
Hi,

I guess I didn't realize keywords was a field I added. I really don't remember adding it.

In looking over the files some things weren't imported properly.

I've just spent 9 or 10 reinstalls trying to get it to accept my links.def file:

Code:

%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 150, 1, '', ''],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Copyright Info' => [6, 'alpha', 40, 75, 0, 'Copyright 1999, Digital Postcards (R)', ''],
Keywords => [7, 'alpha', 40, 150, 0, '', ''],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Thumb => [14, 'alpha', 40, 150, 0, '', ''],
Twidth => [15, 'alpha', 5, 5, 0, '', ''],
Theight => [16, 'alpha', 5, 5, 0, '', ''],
Priority => [17, 'alpha', 0, 5, 0, '', 'Yes|No'],
SendCGI => [18, 'alpha', 25, 25, 0, '', ''],
DateAdded => [19, 'date', 15, 15, 0, \&get_date, '']
); # end db_def 's
[/CODE}

But I end up with the following links.def in SQL:

Code:
%db_def = (
ID => ['1', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
Title => ['2', 'CHAR', '40', '100', '1', '', '', '3'],
URL => ['3', 'CHAR', '40', '150', '1', '', ''],
Add_Date => ['4', 'DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
Mod_Date => ['5', 'DATE', '20', '20', '1', 'NOW', '^\d{4}\-\d{2}\-\d{2}$'],
CategoryID => ['6', 'INT', '10', '20', '1', '0', '^\d*\.?\d*$'],
Description => ['7', 'CHAR', '40x3', '5000', '0', '', '', '1'],
Contact_Name => ['8', 'CHAR', '40', '50', '0', '', ''],
Contact_Email => ['9', 'CHAR', '40', '50', '0', '', ''],
Hits => ['10', 'SMALLINT', '10', '20', '1', '0', '^\d*\.?\d*$'],
isNew => ['11', 'CHAR', '0', '3', '1', 'No', 'Yes|No'],
isPopular => ['12', 'CHAR', '0', '3', '1', 'No', 'Yes|No'],
Rating => ['13', 'DECIMAL', '10', '20', '1', '0.00', '^\d*\.?\d*$'],
Votes => ['14', 'SMALLINT', '10', '20', '1', '0', '^\d*\.?\d*$'],
ReceiveMail => ['15', 'CHAR', '0', '3', '1', 'Yes', 'Yes|No'],
Copyright_Info => ['16', 'CHAR', '40', '75', '0', '', ''],
Thumb => ['17', 'CHAR', '40', '150', '0', '', ''],
Twidth => ['18', 'INT', '10', '20', '0', '', '^\d*\.?\d*$'],
Theight => ['19', 'INT', '10', '20', '0', '', '^\d*\.?\d*$'],
Priority => ['20', 'CHAR', '5', '5', '0', '', ''],
SendCGI => ['21', 'CHAR', '25', '25', '0', '', '']
);
Code:

I can't get the Keywords field to import at all.
Quote Reply
Re: Searching/Keywords In reply to
I've been continuing to play with it.

I used the Links Admin Table editor to add "Keywords"

The field showed up in the database (when I look directly) but it was not added to the links.def file. In fact, it said the "Field already exists" and refused to add it... but apparantly added it to the MySQL database.

I manually entered it, then synced them,a nd I think I got it working... but I'm still not 'live' so if there are any bug fixes, I can drop the tables and reinstall.

Quote Reply
Re: Searching/Keywords In reply to
Hello!

I have had similar problems.

After I installed the www.phpwizard.net the php admin scripts my life became easier. It gives an overview on the web of all the fields existing in the database + allowing the possibility of changing the properties of each field and the coloum. It also allows you to dump out the existing data + import. There are a lot of features. I have not yet seen the Links SQL 1.02 and so I do not know about the new features and cannot compare it.

What you describe here below is also something similar to what I have had earlier. There is no doubt if such a thing happenes, the best I consider is to drop or delete that table and install a new one. That the problem in your case. Also later if you add a new field the sequence of the field numbering will be of that the last one and not the one you inserted.

You can also modify the SQL.pl and delete the remaining and keep only that part of the table that you wanna create. Its a very simple script and nice.

It seems like that in your table configuration there is something wrong somewhere in the field definitions. Links.def is only the last part of the story of creating but your problem is somewhere before either in the SQL.pl or database. Get phpMyAdmin and you will be able to see it and also print it.

Further, its bugs free and that gives me a lot of confidence to use it.

------------------
rajani