I have a Books table in my MySQL database that has the columns Title (varchar (255)) and Edition (varchar (20)). Examples of such values are “Introduction to Microeconomics” and “4”.
I want users to search for books based on Title and Edition. So, for example, they can enter Microeconomics 4, and this will bring the correct result. My question is how should I install this on the database side.
I was told that a FULLTEXT search is usually a good way to do such things. However, since the edition sometimes represents only one character ("4"), a full text search must be configured to view individual characters (ft_min_word_len = 1). This, I heard, is very inefficient.
So how do I set up a search for this database?
UPDATE: I know CONCAT / LIKE can be used here. My question is: will it be too slow. There are hundreds of thousands of books in my book database, and many users will search for it.
source
share