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

Problems with Search

Quote Reply
Problems with Search
I have two problems with search i the most recent version of Link SQL 1.1

1. I try searching on the string "akita dog"
no matter what I do , i get links which contain the word (akita OR dog) instead of the intended (akita AND dog) I assume the default is AND but I have also explictly set the AND condition in the Advanced Search Page.


2. When I search from any of the category pages I get the "Search Options" page.

Thanx for your help
prodogs
Quote Reply
Re: Problems with Search In reply to
Hi:

I just ran into a problem, too. For the most part, search runs fin.... but I earched the term "Ann" and got this error:

Can't use an undefined value as an ARRAY reference at admin/Links/Search.pm line 904.

Yet, I search Mickey and get results...

Any ideas?

Dave

You can test this search at:

http://www.bcdb.com/

And I have not monleyed with search.pm. I don't think...

Quote Reply
Re: Problems with Search In reply to
I can't duplicate the "ann" problem. Try re-indexing.

As for the sort order ... make sure you have the right settings in the search template.

As for the "search options" that's probably a minor bug. The program uses the search-results template, but says it's in the search options area rather than search results area. Cosmetic, I don't think functional problem.

Quote Reply
Re: Problems with Search In reply to
The default is now "parsed search" mode. if you want both akita and dog together type: +akita +dog and you will have them. I'll take a closer look at the code if you'd like.

carfac, your problem seems a little more ominous. Could I bother you to send me your login information to take a look? (i managed to duplicate the error)

aki@gossamer-threads.com

[This message has been edited by kitsune (edited December 05, 1999).]
Quote Reply
Re: Problems with Search In reply to
kitsune,

Is there anyway to change the default so that when a user types "akita dog" I will get only those links which contain <akita and dog>?

Also - I guess the meaning of "Match All Words" on the search options page. Can you explain what can be expected?

Thanx
prodogs

>>The default is now "parsed search" mode. >>if you want both akita and dog together >>type: +akita +dog and you will have them. >>I'll take a closer look at the code if >>you'd like.
Quote Reply
Re: Problems with Search In reply to
Is there a way one of you could list the changes to the search routines and the options? I looked at all the templates, and don't see them.

Is it possible to make up an html fragment that would encompass all the options?

Also, where in the program would you override the options if you wanted to prevent a user from being able to change them?

It would be a big help to have the advanced search options list what was available and how they work.



------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/







Quote Reply
Re: Problems with Search In reply to
Look for the following lines in Search.pm:

Code:
# search mode
mode => $SEARCH_MODES{parse},

and change the "parse" to "and". And theoretically, it should work.

For an HTML snippet, I'll have to get back to you.

**UPDATE**

Currently, it's not possible to switch between the modes. It's really a matter of api specification. The Search module plugs into DBSQL but dbsql doesn't yet have a method to "select your search type".

The Template is also out of date, there is only one search method, which is the query string. We're looking at the problem, but no promises yet.

So currently, just set the defaults as describe above.

pugdog, if you'd like more detailed info on the module let me know Smile


[This message has been edited by kitsune (edited December 06, 1999).]
Quote Reply
Re: Problems with Search In reply to
ok changed the line to read

mode => $SEARCH_MODES{and},

and go the following error

Software error:
Can't use string ("2") as a HASH ref while "strict refs" in use at admin/Links/Search.pm line 1141.
For help, please send mail to the webmaster (webmaster@prodogs.com), giving this error message and the time and date of the error. ;


any suggestions

thanx
prodogs
Quote Reply
Re: Problems with Search In reply to
Whoops! My fault.

Look in Search.pm, and update sub query to the following:
Code:
# ... the search method is one of the more constrictive types..., thank goodness!
my ( $tokens, $rejected ) = $self->_tokenize ( $query_string );
push @{$self->{rejected}}, @$rejected if ( @$rejected );
my $o = {map { $_ => 0 } @$tokens};

the {map { $_ => 0 } @$token} has been changed. Then it should work.

Sorry, my fault :P

Quote Reply
Re: Problems with Search In reply to
Yes, if you could post what there is on this module.... it's sort of a key access point to the software, so if it's not working the way it used to, it would be nice to get the specs on how it is working.

There have been so many changes, can we get the current specs in one place? Smile

Quote Reply
Re: Problems with Search In reply to
Ok

did the following
<
# ... the search method is one of the more constrictive types..., thank goodness!
my ( $tokens, $rejected ) = $self->_tokenize ( $query_string );
push @{$self->{rejected}}, @$rejected if ( @$rejected );
my $o = {map { $_ => 0 } @$tokens};


# ... the search method is one of the more constrictive types..., thank goodness!
# my ( $tokens, $rejected ) = $self->_tokenize ( $query_string );
# push @{$self->{rejected}}, @$rejected if ( @$rejected );
# my $o = map { $_ => 0 } $tokens;
>

but still get same results as before

<akita dog> returns links with "akita or dog" and not the intended "akita and dog"

help ..

thanx
prodogs
Quote Reply
Re: Problems with Search In reply to
The api documents are found here:
http://www.gossamer-threads.com/...ts/spider/Search.txt

prodogs, that's odd, have you set the default mode to be "and" as well?


Quote Reply
Re: Problems with Search In reply to
I cleaned up and HTML-ized it a little.

It's just surrounded by <PRE> tags.

http://postcards.com/...earch_Manual_1a.html

Feel free to use/edit/correct this version.
It's a bit easier to read than the plain text.
Quote Reply
Re: Problems with Search In reply to
Sorry I am so lame, but how do I set the default to "add".

thanx
prodogs
Quote Reply
Re: Problems with Search In reply to
Never Mind, figured it out. Now it works fine.

Thanx for your help.

Prodogs
Quote Reply
Re: Problems with Search In reply to
Opps..

Still have the Search Options page problem.

That is , I always go to the "Search Options" page if I initiate a search on any page other than the Home page.

thanx
prodogs
Quote Reply
Re: Problems with Search In reply to
Hi,

I changed the search.pm to default to "and", and I don't get any matches when searching two terms, even if they exist. Frown
Quote Reply
Re: Problems with Search In reply to
did you also update sub query in Search.pm?