WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Advanced Search -

Version: 3.14
printPrint


Advanced Search -
siteengineering
Member

Usergroup: Customer
Joined: Feb 16, 2005
Total Topics: 4
Total Posts: 21
Posted 03/11/05 - 03:12 AM:
quote post
#1
Site under development but WSN (v3.14) functionality is largely in place:
http://www.ulster.com/directory/search.php

D/b contains 12 test records.

Searching "company or organisation name" field for "has ANY of the words" "site company fishmarket" (without quotes) should return 4 records (I think). In fact it returns all 12.

Searching "company or organisation name" field for "has ALL of the words" "company clothing" (without quotes) should return only 1 record. In fact it returns all 12.

All records are returned under the above conditions even if another search field is also specified in advanced search. The problem is not particular to the "company or organisation name" field - it occurs for all fields using any/all.

I won't make any changes to the test records until this is resolved, so that you can see exactly the same issues.

Thanks!
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6339
Posted 03/11/05 - 08:47 PM:
quote post
#2
Tell me if the title field is selected as a searchable field for links. I rememeber a WSN Forum bug where too many results were showing in an advanced search when a field wasn't marked as simple-searchable.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
siteengineering
Member

Usergroup: Customer
Joined: Feb 16, 2005
Total Topics: 4
Total Posts: 21
Posted 03/12/05 - 07:09 AM:
quote post
#3
Thanks for reply. All five of the link fields in that form are set as searchable in the Functionality section of the admin panel.

Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6339
Posted 03/13/05 - 09:09 PM:
quote post
#4
Duplicated and figured it out. (Wasn't showing all results for me, just wrong ones. Was showing wherever the term was any of the fields instead of just the specified field I think.) Use the attached search.php file.

[removed: was buggy]

Edited by Paul on 03/15/05 - 04:01 AM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
siteengineering
Member

Usergroup: Customer
Joined: Feb 16, 2005
Total Topics: 4
Total Posts: 21
Posted 03/14/05 - 07:06 AM:
quote post
#5
Thanks, but that's not working as expected. Is my understanding of these functions correct?

ALL OF THE WORDS
should return records for which all "words" in the search string are substrings of the specified field

ANY OF THE WORDS:
should return records for which any "word" (space delimited string) in the search string is a substring of the specified field

Example: separate searches for "contains" word "site" returns 2 records, "company" returns 2 records (1 duplicate of 1st search), "fishmarket" returns 1 new result. An "any of" search for "site company fishmarket" should return the union of these sets of results, which in this case is 4 records. Only 2 are being returned with the new search.php.

(Sidenote: typing a space after the last word causes all db records to be returned)

Thanks again for your efforts here.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6339
Posted 03/15/05 - 04:01 AM:
quote post
#6
I think this finally solves things (including the sidenote).

Attached Files:
search.php
(36 KB, 23 downloads)

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
siteengineering
Member

Usergroup: Customer
Joined: Feb 16, 2005
Total Topics: 4
Total Posts: 21
Posted 03/15/05 - 06:36 AM:
quote post
#7
Thanks again. Sorry, though - there are still a few issues:

"Any of" almost works. Only one relatively minor exception that I could find... while a substring of a word is usually enough to give a match, this is not the case for the first word in the search field.

"All of" seems to be behaving very similarly to "any of". For example, on my page above, the search for "all of" "site company fishmarket" should yield no results. It actually gives four - same as "any of". I checked by html in case we'd put "or" instead of "and" but it's OK.

Thanks again Paul. Sorry to be a thorn in your side!
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6339
Posted 03/16/05 - 05:04 AM:
quote post
#8
http://links.webmastersite.net/search.php

title has all of the words 'webmaster resources' has 11 results and all look proper
title has any of the words 'webmaster resources' has 46 results

title has all of the words 'webmast resources' has 11 results
title has any of the words 'webmast resources' has 47 results

So, I can't see how you're getting your results.

Edited by Paul on 03/16/05 - 05:09 AM

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
siteengineering
Member

Usergroup: Customer
Joined: Feb 16, 2005
Total Topics: 4
Total Posts: 21
Posted 03/16/05 - 09:32 AM:
quote post
#9
I can't see any problems with the search.php you have running there, yet the issues on my installation are obvious. Sorry to ask this... please don't be insulted, but are you sure that you attached the latest version above?

Thanks again.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6339
Posted 03/18/05 - 07:50 AM:
quote post
#10
I don't have any other WSN Links versions on my computer (though I suppose it could be from another script), but here it is again.

Attached Files:
search.php
(36 KB, 17 downloads)

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
siteengineering
Member

Usergroup: Customer
Joined: Feb 16, 2005
Total Topics: 4
Total Posts: 21
Posted 03/18/05 - 10:25 AM:
quote post
#11
Yep, that's the same file. It just won't work for us - no idea why and don't have the time to pour over the source. I've had to remove the "all words" option. It's still a great search tool without it. Anyway Paul, thanks for your time.
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.