Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6809425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:05:06+00:00 2026-05-26T20:05:06+00:00

I am trying to do a FULLTEXT search against two columns. The first column

  • 0

I am trying to do a FULLTEXT search against two columns. The first column holds subject names, the second column aliases, such as:

|            name            |      also_match      |
-----------------------------------------------------
|   Information Technology   |   IT I.T.            |
|   Mathematics              |                      |
|   English                  |                      |
|   Religious Studies        |   RS R.S. RE R.E.    |

Schema details:

These columns are both VARCHAR(100) and I have tried multiple types of FULLTEXT indexes. I have tried separate indexes for both of the columns, and I’ve tried an index that covers both columns together.

The search works fine at returning results based on the name column, but nothing turns up from the also_match column.

Example query that returns 1 result:

SELECT *
FROM subjects
WHERE MATCH(s.name, s.also_match) AGAINST ('*Information*' IN BOOLEAN MODE)
LIMIT 20

Example query that returns 0 results:

SELECT *
FROM subjects
WHERE MATCH(s.name, s.also_match) AGAINST ('*IT*' IN BOOLEAN MODE)
LIMIT 20
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:05:07+00:00Added an answer on May 26, 2026 at 8:05 pm

    I think your problem is that MySQL does not index words shorter than a certain length. That length is specified in the ft_min_word_len variable.

    For example, assuming your table is this:

    +------------------------+------------+----+
    | name                   | also_match | id |
    +------------------------+------------+----+
    | Information Technology | IT I.T.    |  1 |
    | Mathematics            |            |  2 |
    | Religious Studies      | RS         |  3 |
    | Computer Studies       | C.S. CSSS  |  4 |
    +------------------------+------------+----+
    

    Then the following query works:

    SELECT * FROM `fulltext` f 
    WHERE MATCH (also_match) AGAINST ('CS*' IN BOOLEAN MODE);
    
    +------------------+------------+----+
    | name             | also_match | id |
    +------------------+------------+----+
    | Computer Studies | C.S. CSSS  |  4 |
    +------------------+------------+----+
    

    If you make ft_min_word_len shorter, then it unfortunately affects the entire server, and is likely to make FULLTEXT indexes much larger.

    You might have to resort to using LIKE on also_match when you detect really short keywords, or build your own fulltext search.

    One of these fulltext search engines might also be able to solve your problem:

    • Sphinx
    • Lucene
    • Xapian
    • Solr
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to implement a fulltext search on two columns which I created
I'm trying to do MySQL fulltext search using the following query: SELECT * FROM
Okay, so I'm trying to make a full text search in multiple columns, something
I am trying to build a very basic fulltext search app in php. I
I am trying to get the FullText Search working in SQL Server 2008 R2.
I am trying to create a simplified search box that will match multiple columns
Trying to implement search with Sunspot Gem wich is using Solr.Fulltext search works fine
I am currently trying to develop a basic fulltext search for my website, and
I want to use Lucene.NET for fulltext search shared between two apps: one is
I am trying to have some form of fulltext search for one of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.