|
05-02-2004, 09:44 PM | #1 |
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 |
05-02-2004, 09:46 PM | #2 |
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. |
05-03-2004, 01:31 PM | #3 |
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 |
05-03-2004, 02:39 PM | #4 |
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. |
05-03-2004, 05:47 PM | #5 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
|
05-03-2004, 06:14 PM | #6 |
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); |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search = Alwais No Result | benj-- | Troubleshooting | 0 | 07-26-2006 09:17 AM |
Problems with the search result | Paka76 | How-to Forum | 1 | 12-05-2005 06:53 AM |
fuzzy search on product numbers | indeh | How-to Forum | 0 | 10-13-2004 12:33 PM |
strange result | franklin74 | Troubleshooting | 2 | 09-13-2004 03:18 AM |
strange things in search results | jive | Troubleshooting | 2 | 11-06-2003 09:20 AM |