Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Search probs still :(

Quote Reply
Search probs still :(
Just tried to do a search for;

Maybe you didn't strip carriage returns after a network transfer?

However,i know there are definatly posts about this, even though none werereturned. After this i removed the ? and it brought up loads of threads. I amassuming this is still a bug, correct?



Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Search probs still :( In reply to
Hmm... yes it seems so. If you do a search for 'Maybe you didn't strip carriage returns after a network transfer' you get 205 results. Seems the punctuation is messing things up. We'll look into it.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search probs still :( In reply to
I guess it's a little more complicated than the mysql->quote function? :-)

- wil
Quote Reply
Re: [Wil] Search probs still :( In reply to
Yokes Shocked! You've found a bug in the search query parser, sneaky little bugger too. The part that pulls the query string apart so that the system can search was broken.

Code:
while ( $text =~ m{
# the first part groups the phrase inside the quotes.
# see explanation of this pattern in MRE
([+-]?"[^\"\\]*(?:\\.[^\"\\]*)*)" ?
probline | ([\w\x80+-\xFF\-\*]+),?
| ' '
}gx )
{

The part that has [\w\x80-\xFF\-\*] is broken when is "+-\xFF"

To fix, you'll need to find 402 in the file admin/GT/SQL/Search/Base/Search.pm. Then change the line so so that it looks like the following:

Code:
while ( $text =~ m{
# the first part groups the phrase inside the quotes.
# see explanation of this pattern in MRE
([+-]?"[^\"\\]*(?:\\.[^\"\\]*)*)" ?
| (\+?[\w\x80-\xFF\-\*]+),?
| ' '
}gx )
{

(basically remove the "+" and move it to the right of the left bracket with "\+?")

Thanks for finding this problem! Smile

Aki
Quote Reply
Re: [Aki] Search probs still :( In reply to
I don't know if this was fixed a long time ago, or just now with the fix you posted but I noticed I was finally able to search for something like search.cgi and get results. Good Job.
Lavon Russell
LookHard Mods
lavon@lh.links247.net
Quote Reply
Re: [Aki] Search probs still :( In reply to
I see you have your own quote function :-) Well done!

- wil
Quote Reply
Re: [Wil] Search probs still :( In reply to
Hi,

It's not quite a quote, but rather taking a phrase "Maybe you didn't strip carriage returns after a network transfer?" and breaking that up into search words that are indexed. If it doesn't do it the same way the indexer does (the main thing is how you handle punctuation), then you run into problems.

Cheers,

Alex
--
Gossamer Threads Inc.