John thegimper wrote:
Ok how can i mix boolean and regexp searches?
SELECT * FROM tbl WHERE MATCH (name) AGAINST ('TEST' IN BOOLEAN MODE) OR name
REGEXP 'TEST';
That dont work :(
"That dont work" does not provide any useful information on which to base a
reply. We aren't mind readers. If
Ok how can i mix boolean and regexp searches?
SELECT * FROM tbl WHERE MATCH (name) AGAINST ('TEST' IN BOOLEAN MODE) OR name
REGEXP 'TEST';
That dont work :(
Quoting [EMAIL PROTECTED]:
> John thegimper <[EMAIL PROTECTED]> wrote on 08/22/2005 04:55:46 AM:
>
> > my host dont want to change the
Enrique Sanchez Vela wrote:
John,
using 'one.*two|two.*one' would do it. :)
regards,
esv.
That will work, but doesn't generalize very well. Imagine how that will
look with 4 or 5 search terms.
LIKE and REGEXP are meant to match strings, not find words. They are
ill-suited to finding ma
John thegimper <[EMAIL PROTECTED]> wrote on 08/22/2005 04:55:46 AM:
> my host dont want to change the ft_min_word_len it´s now at 4 chars
> and i need
> to do searches with only 2 chars.
>
> Quoting Jasper Bryant-Greene <[EMAIL PROTECTED]>:
>
> > John thegimper wrote:
> > > Thanks so there is
my host dont want to change the ft_min_word_len it´s now at 4 chars and i need
to do searches with only 2 chars.
Quoting Jasper Bryant-Greene <[EMAIL PROTECTED]>:
> John thegimper wrote:
> > Thanks so there is no operator that tells mysql that both words must
> match?
> >
> > "one|two" is equal
John thegimper wrote:
Thanks so there is no operator that tells mysql that both words must match?
"one|two" is equal to "one OR two"
I want an operator that is equal to "one AND two" but i guess i will have to
use match in boolean mode for that?
Why not use full-text searching instead of rege
Thanks so there is no operator that tells mysql that both words must match?
"one|two" is equal to "one OR two"
I want an operator that is equal to "one AND two" but i guess i will have to
use match in boolean mode for that?
Quoting Enrique Sanchez Vela <[EMAIL PROTECTED]>:
>
> John,
>
> using
John,
using 'one.*two|two.*one' would do it. :)
regards,
esv.
--- John thegimper <[EMAIL PROTECTED]> wrote:
> ok just figured out that if the database contains
> "one and one is two"
> and i use regexp to search for "one two" it will not
> match.
> If i search for "one(.*)two" it will.
> But
possible answers to your request are:
select * from tablename where stringname REGEXP
'SAMSUNG[^4]*40GB';
select * from tablename where stringname REGEXP
'SAMSUNG.*40GB'
they both matched your sample string, I personally
like the first one better but it is up to you the one
to use.
regards,
ok just figured out that if the database contains "one and one is two"
and i use regexp to search for "one two" it will not match.
If i search for "one(.*)two" it will.
But how can i make it match if i search for "two one" ?
Quoting John thegimper <[EMAIL PROTECTED]>:
> Here is another user with
Here is another user with the same problem
http://forums.pcworld.co.nz/archive/index.php/t-34536.html
Maybe his explanation is better :)
Quoting John thegimper <[EMAIL PROTECTED]>:
> SELECT * FROM tbl WHERE item REGEXP 'SEARCHSTRING'
>
> Database holds:
> SAMSUNG IDE 40GB 7200RPM
>
> Search fo
SELECT * FROM tbl WHERE item REGEXP 'SEARCHSTRING'
Database holds:
SAMSUNG IDE 40GB 7200RPM
Search for
SAMSUNG IDE 7200RPM = 0 RESULTS
SAMSUNG 40GB 7200RPM = 0 RESULTS
SAMSUNG +40GB +7200RPM = 0 RESULTS
SAMSUNG IDE 40GB = 1 RESULT
How do i need to change the SEARCHSTRING to use AND for each word
12 matches
Mail list logo