Gossamer Forum
Quote Reply
search ?
Hello,

how can i config Linkssql that it find all searched words not only the exact word . for example:
window->find ->
windows
window
microsoft-windows
,..


Quote Reply
Re: search ? In reply to
You want to do 'substring' searches. That gets changed to ww = 0 (whole Word = off)



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
hello,

thanks but where can i find this setting ? can you mail me the name of the file ?

Quote Reply
Re: search ? In reply to
Check the default templates that come with it. It shows how to pass the parameters to the search.cgi program.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
hi,

ok i open the footer.tpl with the search code but i cant find any ww=1 or ww=2 extension or field ?!?!?

Quote Reply
Re: search ? In reply to
open the search template, it's something like search.html it will show you in a drop down selection list how to use the bool selection, of and, or, substring where substring is any part of a word, i.e. window will find windows

"I've got if's pretty good, but that's about it"
Quote Reply
Re: search ? In reply to
Are you referring to the 'substring' option? I don't see anything about 'ww' in the templates.

I'm finding it virtually impossible to get reliable (i.e. predictable) search results -- as opposed to Links 2's search utility which works as expected almost every time. I've tried numerous combinations of search.cgi (indexed), search-ni.cgi (non-indexed), AND connector, OR connector, whole words, and substrings, and half the searches always meet with dissapointing results... :(

Has anyone found a good balance of the different settings? Substring matches is a priority, both for words and URLs -- expecting site visitors to be mind readers is a bit of a stretch.

Alex, please tell me this will be working better in the next release??? It's tough to bill something as a search engine when you constantly have to answer questions as to why such and such didn't appear in the search results...

edit: I should also say that it's not just a matter of scoring/sorting the search results, it's a matter of getting things to actually show up in the results, despite reasons that make absolutely no sense to the majority of visitors.

Dan

Quote Reply
Re: search ? In reply to
It's part of the search.html template... and the search_error.html

In the <FORM> field, a field called substring is set. You want to have that set to 1 for partial searches or 0 for full searches.

If you want to change the default behaviour, you can open search.cgi and change the place where it sets the default for ww=1 to ww=0 (This is the REVERSE of substring, since "Whole Word" is the opposite of substring).

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
Ok, I see what you're talking about. That wouldn't accomplish anything different than passing 'substring' would it? Seems it's just a different way of setting the value.

($in->param('substring')) ? ($ww = 0) : ($ww = 1);

How would you turn that around without changing the meaning of 'substring'?

Searching for Run The Planet, which is the full title of one of my links (URL is www.runtheplanet.com), this is the best balance of search results I have managed to come up with:

http://run-down.com/...query=run+the+planet - correct results
http://run-down.com/...i?query=runtheplanet - no results
http://run-down.com/...=and&substring=1 - correct results
http://run-down.com/...=and&substring=1 - correct results
http://run-down.com/...i?query=runtheplanet - correct results
http://run-down.com/...query=run+the+planet - nowhere to be seen???

Hmm, I just realized one thing. When using search-ni.cgi, it's going back to search.cgi on the page spanning. That certainly affects things. I fail to see why searching by the exact title would not register a positive result, no matter what the settings are...

Dan

Quote Reply
Re: search ? In reply to
"The" is not a searched word... that may have something to do with it.

Since "substring" is confusing, I've actually edited my search forms and search.cgi to use "ww" directly.

($in->param('www')) ? ($ww = 1) : ($ww = 0);

Which is if 'ww' is passed in, it's explicitly set to '1', otherwise, it defaults to substrings ie: 0.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
Has that approach worked well for you?

param('www'))

Do you mean param('ww')) or are you passing 'www' from the search form?

I assume you are changing:

Substring: <input type="RADIO" name="substring" value="1" CHECKED> Exact Word: <input type="RADIO" name="substring" value="0">

to something like:

Substring: <input type="RADIO" name="ww" value="0" CHECKED> Exact Word: <input type="RADIO" name="ww" value="1">

Dan

Quote Reply
Re: search ? In reply to
Yeah, I meant "ww"

Substring: <input type="RADIO" name="ww" value="0" CHECKED>
Exact Word: <input type="RADIO" name="ww" value="1">

Right, that looks good.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
I'll need to play around with it and test it more thoroughly, but that appears to have addressed at least some of the problematic searches. Thanks.

Dan

Quote Reply
Re: search ? In reply to
Mind you... you need to be using the 1.13 code.... the 1.11 code I don't think worked with this at all. 1.13 fixes parts of it.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
Thanks for pointing that out. I have the 1.13 version of search.cgi (which is probably why it seems to work Smile ). The only other two 1.13 files I upgraded were Search.pm and DBSQL.pm. I never did find any documentation on what the other changed files were (I saw a long list of them, but the 1.13 notice only mentioned the 3 ones above, as I recall).

Dan

Quote Reply
Re: search ? In reply to
I think 1.12 had the updated search.

1.13 had some generalized fixes as well.

I'm not sure, but I've upgraded all the sites I run with 1.13.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
hello,

hm it dosent work! The search engine dosent work! it dosent find any word and it dosent find something like "all" -"allride","allhorse",..

:(

Quote Reply
Re: search ? In reply to
Well, It _does_ work, so something has to be amiss in your configuration.

1) fields in the Links table need to have WEIGHTs.

2) The table needs to be UPDATED (_NOT_ resynced). When you click the link again, you should see weights in the fields after the refresh.

3) If you are using search.cgi you then need to re-index the site.

4) In your forms, you need to pass the correct parameters to search.cgi ie: substring and/or ww depending on how you have set up search.cgi

5) you need to be running version 1.13



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
So what is with + - and * ???

Robert

Quote Reply
Re: search ? In reply to
What do you mean?

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: search ? In reply to
Before i update the code to 1.13 i could do something like:

500*

finds 50000 till 50099

now the * is useless.

The same i could do before:

+car +tools to get all with car AND tools (yes, i could do this with bool, but now you cant do

+car -tools to get all with car but not with tool.

With the *, i could do a a very nice range-search with some addional javascript.

Robert