Hi Anton,
----- Original Message -----
From: "Tichawa Anton" <[EMAIL PROTECTED]>
> I have problems with full-text search. My table contains text lines from
> computer-generated log files rather than documents written by humans,
> and so my first problem is that I need an exact match rather than a
> relevance value, i. e. if the search string is 'ai', I really need all
> rows containing 'ai' to appear in the result, even if this includes
> 99 % of all rows.
Using MySQL FULLTEXT index doesn't appear suitable for your particular
application.
I would suggest simply using the LIKE function.
For more fancy stuff, use REGEXP (RLIKE) with regular expressions.
> Also, I would need to switch between 'case-sensitivity yes/no' and 'search
> for whole words only yes/no'.
Case sensitivity is possible with LIKE by for instance specifying BINARY.
For regular expressions it simply depends on the pattern you specify.
Search whole words yes/no can again be done fairly easily by having to
different patterns.
> Currently, I load all rows to the client and do the search on the client.
> Is there, or will there be, a way to do this kind of text search on the
> server?
Shouldn't be a problem. See above.
Another suggestion.... since the logfiles are computer generated, they might
have a very fixed format. In that case, instead of storing them as text, you
may want to parse the text lines and store the information in separate
fields. Then you can index individual parts (timestamps, command groups)
which will speed up searching as well as enhance your other search
capabilities (summaries for a certain period, etc) by actually utilizing the
facilities instead of simply using the database for storage.
RDBMS are very good at summarizing, selecting sets of data according to
search parameters,
etc. But you have to design your tables with this in mind, otherwise you
miss out on all the benefits.
Regards,
Arjen.
--
MySQL Training Worldwide, http://www.mysql.com/training/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Arjen G. Lentz <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Technical Writer
/_/ /_/\_, /___/\___\_\___/ Brisbane, QLD Australia
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php