PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 05-02-2004, 08:44 PM   #1
Andrew
Green Mole
 
Join Date: May 2004
Location: Zealand
Posts: 5
v1.8.0 strange search result on numbers

I'm pretty desperate...I have a site that has products named things like P1060 etc...searching on P1060 works fine, searching on 1060 returns nothing.

Searching on 1060 P1060 with and operator gives nothing.

Searching on P1060 1060 with or operator gives nothing.

Searching on 1060 P1060 with or operator gives results!!!!


Am i missing the point here? Or are there known bugs with this?
Should I be dropping back to an earlier version of Phpdig? if so which one?
Any help would be greatfully received.

thanks
Andrew
Andrew is offline   Reply With Quote
Old 05-02-2004, 08:46 PM   #2
Andrew
Green Mole
 
Join Date: May 2004
Location: Zealand
Posts: 5
OOOPs I got two examples wrong there....

Searching on 1060 P1060 with and operator gives nothing.

Searching on P1060 1060 with or operator gives results!!!!

Searching on 1060 P1060 with or operator gives nothing at all.
Andrew is offline   Reply With Quote
Old 05-03-2004, 12:31 PM   #3
Andrew
Green Mole
 
Join Date: May 2004
Location: Zealand
Posts: 5
Ok i've noticed something else with further testing. Is it correct that Phpdig only recognises part words if they are the start of the word??

ie
searching for respon will find respond
searching for pond doesn't find respond. hence my problem if people search for the number only 1060 in a part number P1060?????

Could someone clarify this for me.
cheers
Andrew
Andrew is offline   Reply With Quote
Old 05-03-2004, 01:39 PM   #4
Andrew
Green Mole
 
Join Date: May 2004
Location: Zealand
Posts: 5
Hm i think i found my reason, but not an answer...(see quote below).
I tried dropping the mim word size to 1 and then 0 but to no effect.
So does this mean in P1060 the P is a word that is too small to index and the number isn't indexed, and together they aren't considered a word...
I found a site that worked for what i want, but the reference was AAA12345 three letters and the number......

Andrew

3.2. Full Text Indexing

PhpDig indexes all words of a document, excepting small words (less than 3 letters) an common words, those are definded in a text file.

Lone numbers are not indexed, but those included in words are indexed.
Andrew is offline   Reply With Quote
Old 05-03-2004, 04:47 PM   #5
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Welcome to the forum, Andrew. We're glad you could join us.

Perhaps this thread would help.
vinyl-junkie is offline   Reply With Quote
Old 05-03-2004, 05:14 PM   #6
Andrew
Green Mole
 
Join Date: May 2004
Location: Zealand
Posts: 5
Ok i did a kind of code work around :-/
In the search.php before it does the search....i send the search string to a function and check if its a lone integer, if it is....i prefix my P in front of it and search on "P1060 1060".

Its pretty ugly, cos the search field displays the "P1060 1060". But hey...at least they can definitely search on the product codes now. Oh and I made the search type "any".

function check_int($i) {
// return 0 if not int and return 1 if $i is int
if (ereg("^[0-9]+[.]?[0-9]*$", $i, $p)) {
return 1;
} else {
return 0;
}// end if
}// end check_int

if (check_int($query_string)==1)
{
$query_string = "P".$query_string." ".$query_string;
$option = "any";
//echo $query_string;
}
//**
phpdigSearch($id_connect, $query_string, $option, $refine,
$refine_url, $lim_start, $limite, $browse,
$site, $path, $relative_script_path, $template);
Andrew is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search = Alwais No Result benj-- Troubleshooting 0 07-26-2006 08:17 AM
Problems with the search result Paka76 How-to Forum 1 12-05-2005 05:53 AM
fuzzy search on product numbers indeh How-to Forum 0 10-13-2004 11:33 AM
strange result franklin74 Troubleshooting 2 09-13-2004 02:18 AM
strange things in search results jive Troubleshooting 2 11-06-2003 08:20 AM


All times are GMT -8. The time now is 07:08 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.