Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Searching custom fields

Quote Reply
Searching custom fields
I have created an extra column in Links SQL to record UK postcodes against a link.

What I would like to do is to search this column using the 'similar words' approach, as in the Advanced Search option.

For example, if my new column contained:

ST5 1QY
ST9 2FY
ST9 4JK
SH1 3GH

and I entered ST in the search box, it would identify the first two codes, ST9 the middle two etc.

I have tried using the existing advanced search option to achieve this, but it does not appear to identify my new column (I am aware of the three character restriction which has been discussed on another thread).

Do I need to alter search.cgi to pick up my new column? I'd assumed it would do so automatically, as I did add the column though the admin panel.

Any advice would be much appreciated (Links SQL newbie!!). I hope the above is clear - if not, let me know!

Thanks
Quote Reply
Re: [valiant] Searching custom fields In reply to
You need to specify an INDEX WEIGHT value for this new column...without specifying it, that column will not be indexed, and thus not work with the out-of-box search form codes.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] Searching custom fields In reply to
AnthroRules

I gave my new column a search weight of 1, but the search option still could not identify any postcodes, even when I typed in the full postcode of a known link.

Any other suggestions?

Cheers.
Quote Reply
Re: [valiant] Searching custom fields In reply to
It is not clear whether you have done this or not, but add a field in your advanced search form:

Code:

<input type="text" name="columname" size="40" maxlength="255">


The columname should be the name of the Zip Code column...you will need to use the OR boolean and match any words option in order for this to work.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] Searching custom fields In reply to
Sorry, Anthro - a bit of your message appears to be missing (!)
Quote Reply
Re: [valiant] Searching custom fields In reply to
Uh...nope, the message is all there!

BYE!
========================================
Buh Bye!

Cheers,
Me