Adam,

this will not work with fulltext. Non-alphanumeric characters will be
ignored and treated as spaces. There remain some chunks like 10 2 4 and
these are too short (less than 3 characters) and will never be indexed.

Sorry, no way. Except for an ugly hack. You may try to replace dots
between numbers in your data and in your query with something else. But
your client application has to take care of this.
Let's have a look at an example abusing character with ASCII 254 decimal:

> create table ft ( r1 varchar(255), fulltext ftindex (r1)) type=MyISAM;

> insert into ft values('some data 10þ4þ6'),('today 2003þ3þ4'),('on mysql
  version 4þ0þ12');

> select * from ft where match(r1) against('10þ4þ6');

yields:

*************************** 1. row ***************************
r1: some data 10þ4þ6
1 row in set (0.01 sec)

and:

> select * from ft where match(r1) against('4þ0þ*' in boolean mode);

yields:

*************************** 1. row ***************************
r1: on mysql version 4þ0þ12
1 row in set (0.00 sec)

and its up to your client application to convert those 'þ' char(FE) back
to '.'

happy hacking,
Thomas Spahni

On Thu, 3 Apr 2003, Adam Randall wrote:

> Since no one responded to this message at all, I'm sending it again.
>
> I have a support system set up where people can search for various
> things using a fulltext index. The problem that I am having, though,
> is that I cannot seem to figure out how to get search results for
> values like "10.2.4" or "6.0.4". This is with MySQL 4.0.12, with the
> minimum word length of 3 (so we can search for PHP, IIS, etc).
>
> Here are some examples of how the search is being performed:
>
> select id,topic from articles where match(topic,summary,description)
> against ('10.2.4');
> (no results)
>
> select id,topic from articles where match(topic,summary,description)
> against ('"10.2.4"' in boolean mode);
> (no results)
>
> select id,topic from articles where topic like '%10.2.4%' or summary
> like '%10.2.4%' or description like '%10.2.4%';
> (3 rows found)
>
> I don't really want to do the last search because it's the slowest,
> and searching the most data un-indexed.
>
> Anyway, if anyone has any advice, I would appreciate it.
>
> Adam.
>
> -----------------------------------------------------------------------
> Adam Randall                                      http://www.xaren.net/
> [EMAIL PROTECTED]                                   http://nt.xaren.net/
> [EMAIL PROTECTED]                                    AIM/iChat:  blitz574
>
> "Macintosh users are a special case. They care passionately about the
> Mac OS and would rewire their own bodies to run on Mac OS X if such a
> thing were possible." -- Peter H. Lewis
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to