mysql fulltext

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
According to this text from mysql
supports the * like this 'apple*' "Words match if they begin with the
word preceding the * operator."
But how can I make use of the * like this '*apple' where words match if
they end with the word?

Re: mysql fulltext

kristian wrote:
Quoted text here. Click to load it

I think you want this:

SELECT * FROM table WHERE textfield LIKE '%apple'

This selects everything where textfield ends on apple. See chapter
12.3.1 in the MySQL 5.0 reference manual.

Re: mysql fulltext

not quite, although it fits the '*apples' problem.

But if I enter a search phrase like 'php5 mysql' it dosnt match
anything. If I use select title, description from sometable
        where match (title,description) against ('$word' in boolean mode) I
can add '$word*' and I will get results where $word is at the
beginning, what I want is also to have results where $word is at the

Re: mysql fulltext

Hash: SHA1

kristian schrieb:
Quoted text here. Click to load it
Unfortunately this is not supported by the nature of how mysql fulltext
index works.
What you can do is some tricky stuff like having your text also in a
mirrored version like "drow" and also an index on it. That way you could
also find words ending on "word" by doing a search against

This was just a thought out of the blue and since I don't know your
entire design and stuff it fits or it doesn't.

Version: GnuPG v1.4.2.1 (MingW32)


Re: mysql fulltext

thanks for the reply, I found this page and I think using
regexp in mysql will do the trick, I'll give it a try.

Thanks again.

Site Timeline