By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,439 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,439 IT Pros & Developers. It's quick & easy.

stop words in mysql - ignoring a/an/the

P: n/a
What are the mechanisms to make words like a/an/the in text and varchar
character fields ignored when performing SELECT and utilizing ORDER BY
in SQL queries?

I've done some hunting around into documentation on character sets (but
they are geared mainly at character-by-character rules) and saw some
reference to string collating and stop words -- but not seen any of this
all put together.

Thanks for any assistance,
Paul Bramscher
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Paul Bramscher wrote:
What are the mechanisms to make words like a/an/the in text and varchar
character fields ignored when performing SELECT and utilizing ORDER BY
in SQL queries?

I've done some hunting around into documentation on character sets (but
they are geared mainly at character-by-character rules) and saw some
reference to string collating and stop words -- but not seen any of this
all put together.

Thanks for any assistance,
Paul Bramscher


No way to make mySQL a library or title-friendly database? I'd like to
ORDER BY records while ignoring common words like a/an/the which often
start titles of books, journals, etc.

I've thought about filtering these out in the input side, perhaps
creating a mirrored field which performs the real ..."ORDER BY
title_filtered" -- and display the actual title in its place -- but this
seems a little kludgy, something the RDBMS should be able to handle
natively with a language ruleset.

Nobody experiment with anything like this?
Jul 23 '05 #2

P: n/a
Paul Bramscher wrote:
No way to make mySQL a library or title-friendly database? I'd like to
ORDER BY records while ignoring common words like a/an/the which often
start titles of books, journals, etc.


As far as I know, the only part of MySQL that supports stop words is the
Full-text Search feature.

There are ways to use the relevance value returned by MATCH() in an
ORDER BY clause (see user comment from Patrick O'Lone at
http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html), but this isn't
the same thing as sorting by the string while ignoring stop words.

I think you need to maintain an additional column, with stop words
filtered out of titles, so you can sort by the title in the format you want.

Regards,
Bill K.
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.