Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For fast, relevance-ranked searches on Ubuntu, store the searchable columns in an InnoDB FULLTEXT index and query that index with MATCH() ... AGAINST(). Use natural-language mode when MySQL should rank results automatically; use boolean mode when your application must require, exclude, phrase-match, or prefix-match terms. If searches for two-letter codes or common words return nothing, check InnoDB’s minimum token length and stopword settings, then rebuild every affected index after changing them.

What full-text search changes

A conventional query such as LIKE '%ubuntu%' checks whether a character sequence appears in a value. It does not calculate linguistic relevance, and a leading wildcard generally prevents MySQL from using an ordinary B-tree index efficiently. MySQL full-text search builds a specialized inverted index for the words in selected columns. MATCH() identifies the indexed collection, while AGAINST() supplies the search expression and mode.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Natural-language search assigns greater weight to terms that are rarer in the indexed collection and less weight to terms that occur widely. The result is a relevance score that you can return and sort on. Boolean search skips automatic ranking in favor of operators that make application intent explicit. Both modes require a compatible FULLTEXT index on the same columns named in MATCH().

Install and verify MySQL on Ubuntu

On Ubuntu, install the distribution package from a terminal:

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
sudo apt update
sudo apt install mysql-server

Canonical’s Ubuntu Server documentation gives sudo apt install mysql-server as the installation command. After installation, verify that the server is running with either service-management command:

sudo service mysql status
# or
systemctl status mysql

If the service is inactive, start it with sudo systemctl start mysql. Keep the package-managed configuration under /etc/mysql. Before editing a setting, inspect the option-file hierarchy and active defaults; mysqld --verbose --help can show the files MySQL reads and the compiled defaults. Put site-specific server options in the included configuration file intended for local changes so a package upgrade is less likely to overwrite them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create an indexed search collection

Choose the exact columns users will search and index them together. The column list and order in MATCH() must correspond to the indexed collection.

CREATE TABLE articles (
  id BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
  title VARCHAR(200) NOT NULL,
  body TEXT NOT NULL,
  FULLTEXT KEY ft_articles_title_body (title, body)
) ENGINE=InnoDB;

InnoDB is the usual choice for an application table because it provides transactional behavior alongside full-text indexing. Create the index when the table is created, or add one later:

ALTER TABLE articles
  ADD FULLTEXT KEY ft_articles_title_body (title, body);

Index only fields that belong in the same search experience. A title and body collection is sensible when a query should rank both together. If users need separate search semantics, create separate collections instead of placing unrelated fields in one index. The index must exist before the production query is issued; otherwise MySQL reports that no matching full-text index is available.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Query with natural-language mode

Natural-language mode is the default mode, but stating it explicitly makes the behavior clear. The following pattern returns a score, filters out rows with no positive relevance, and orders the matches from most relevant to least relevant:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
SELECT id, title,
       MATCH(title, body) AGAINST (? IN NATURAL LANGUAGE MODE) AS score
FROM articles
WHERE MATCH(title, body) AGAINST (? IN NATURAL LANGUAGE MODE) > 0
ORDER BY score DESC;

Bind the same user query to both placeholders with your database driver rather than concatenating it into SQL. The first occurrence produces the displayed score; the second applies the result filter. A score is meaningful within the collection and query, not a universal quality rating that can be compared across unrelated tables or search strings.

When natural language is the right default

  • Users enter ordinary words and expect the most relevant documents first.
  • You want rare, descriptive terms to influence ranking more than ubiquitous terms.
  • You do not need mandatory, prohibited, phrase, or prefix operators in the user-facing syntax.
  • Your result page can use the returned score for ordering or diagnostics.

Natural-language parsing can omit words that are too short or listed as stopwords. That behavior is often desirable for prose, but it explains many apparently empty result sets.

Use boolean mode for explicit control

Boolean mode lets the application express inclusion and exclusion requirements directly:

SELECT id, title
FROM articles
WHERE MATCH(title, body) AGAINST (
  '+ubuntu +mysql -windows "full text"*' IN BOOLEAN MODE
);

In this example, +ubuntu and +mysql require those terms, -windows excludes rows containing that term, quotation marks treat full text as a phrase, and the trailing * keeps a prefix from being stripped during parsing. Design the query grammar deliberately: if users can type operators, document them and escape or validate input according to your application’s syntax rules.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Requirement Natural-language mode Boolean mode
Primary behavior Ranks terms by their significance in the collection. Applies operators and matching rules supplied in the search expression.
Required or excluded words No operator for mandatory or prohibited terms. + requires a term; - excludes a term.
Phrase matching No explicit phrase operator. Quotation marks form a phrase.
Prefix wildcard Not the mode’s explicit control mechanism. A trailing * preserves a prefix instead of allowing the term to be stripped.
Result ordering Returns a relevance score suitable for ORDER BY. Use when matching rules matter more than automatic ranking; a score is not required by the query pattern.
Common-term behavior on MyISAM Subject to MyISAM’s 50-percent threshold. MySQL documents that boolean mode does not observe that MyISAM threshold.

Boolean mode is therefore useful for filters, command-like search boxes, and advanced syntax. It does not automatically make a poorly designed query more relevant; it gives you control over the rules.

Why MATCH() ... AGAINST() returns no rows

The words are shorter than the indexed minimum

For InnoDB search indexes, the default minimum indexed word length is three characters. A query for a two-letter code such as AI, UK, or DB can return no rows because those tokens were never written to the index. MyISAM’s default minimum is four characters. These defaults are documented for MySQL 8.4 and apply to indexed tokens, not to the character length of the entire column.

The words are stopwords

MySQL omits configured stopwords from full-text indexes. Common words can consequently produce no match even when they visibly occur in a row. For InnoDB, stopword behavior is controlled by innodb_ft_enable_stopword, innodb_ft_server_stopword_table, and innodb_ft_user_stopword_table. MyISAM uses ft_stopword_file. Check the settings on the server that built the index; changing a client connection does not change what is already indexed.

The query and index collections differ

Use the same columns, in the same collection, in both places. An index on (title, body) is not interchangeable with a query that matches only (body) or adds an unindexed column. Confirm the index definition with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
SHOW CREATE TABLE articlesG
SHOW INDEX FROM articles;

The query is being filtered incorrectly

A natural-language query commonly uses > 0 to discard nonmatches. If your application turns a null, empty, or whitespace-only input into a search expression, every row can be filtered out. Validate input before running the query and log the final bound value during troubleshooting. Also check that the application is connected to the server and schema where the index was created.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

The index was not rebuilt after a configuration change

Token-size and stopword options affect index construction. Existing indexes retain their old tokenization until rebuilt. Restarting MySQL alone does not retroactively add omitted words.

Index two-character terms safely

If your product must search two-letter codes, set InnoDB’s minimum token size to two before rebuilding the relevant indexes:

[mysqld]
innodb_ft_min_token_size=2

The option belongs in the active MySQL server configuration under /etc/mysql. Restart when required by the option and your package configuration:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl restart mysql

Then rebuild each affected index. For the example table:

ALTER TABLE articles
  DROP INDEX ft_articles_title_body,
  ADD FULLTEXT KEY ft_articles_title_body (title, body);

Changing the variable without this rebuild leaves the old index behavior in place. Apply the change as a migration rather than an ad-hoc edit:

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
  1. Record the current minimum-token and stopword settings, along with the MySQL version and each server role.
  2. Decide whether two-character terms are genuinely useful; indexing more short tokens can increase noise from abbreviations and codes.
  3. Set the same value on every server that creates or serves the index, including replicas used for reads.
  4. Schedule the restart and index rebuild during a maintenance window appropriate for the table size and workload.
  5. Run representative searches for expected hits, expected misses, and false-positive-prone abbreviations.
  6. Monitor application logs and search quality after deployment, and keep a rollback setting documented.

Do not assume that lowering the threshold improves every search. It changes what is indexed, so terms that were previously ignored can start matching documents that users did not intend to retrieve.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Configure stopwords deliberately

Stopwords are a relevance and recall decision. Leaving them enabled reduces index entries for very common words; disabling or replacing them can be necessary for domains where a normally common word is meaningful. For InnoDB, choose among the server stopword table, a user stopword table, or disabled stopword processing through the documented variables. Keep the chosen policy identical wherever the index is built.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After changing any stopword variable, rebuild every affected InnoDB full-text index with an ALTER TABLE operation. Test both sides of the change: a term that should now be searchable and a common term that should remain excluded. Document the stopword table contents as part of the schema migration so a fresh Ubuntu host creates the same index semantics.

Choose the parser for the language

The built-in parser separates words using delimiters such as whitespace. That is appropriate for languages whose text normally has visible word boundaries. Chinese, Japanese, and Korean text often does not separate words with spaces, so use MySQL’s built-in ngram parser:

CREATE FULLTEXT INDEX ft_cjk
  ON documents (content)
  WITH PARSER ngram;

The ngram parser’s default token size is two, a bigram. MySQL documents a configurable range from one through ten. The parser ignores the ordinary InnoDB and MyISAM minimum-word-length variables, so tune ngram_token_size instead:

[mysqld]
ngram_token_size=2

Changing parser settings also requires rebuilding the affected full-text index. Select the token size based on the language and query behavior you need. Smaller ngrams can represent shorter fragments but create more index tokens; larger ngrams require longer contiguous sequences. Validate phrase and prefix expectations with real text from your application because ngram matching is based on generated token sequences, not the same whitespace-word model used by the built-in parser.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Parser choice Word segmentation Token-size setting Best fit
Built-in parser Uses delimiters such as whitespace to identify words. InnoDB minimum token size (three by default); MyISAM minimum (four by default), plus stopword settings. Languages with clear word boundaries.
ngram parser Generates fixed-length character ngrams, useful when words are not separated by spaces. ngram_token_size, default two and configurable from one through ten. Chinese, Japanese, Korean, and other text requiring ngram segmentation.

InnoDB and MyISAM differences that affect search

Area InnoDB MyISAM
Default minimum token length Three characters. Four characters.
Stopword controls innodb_ft_enable_stopword, innodb_ft_server_stopword_table, and innodb_ft_user_stopword_table. ft_stopword_file.
Common-term threshold Does not use the MyISAM 50-percent rule. Natural-language searches can suppress a term appearing in at least half of the rows; boolean mode does not observe that threshold.
Application fit Transactional table engine suitable for typical write-heavy applications. Legacy nontransactional engine; choose it only when its operational characteristics are intentional.
CJK tokenization Can use WITH PARSER ngram; tune ngram_token_size. Parser and option behavior must be checked against the engine and MySQL version in use.

For a new Ubuntu application, start with InnoDB unless a specific compatibility requirement dictates otherwise. If migrating an existing MyISAM table, retest minimum lengths, stopwords, common-term behavior, and index rebuild procedures rather than assuming the two engines produce identical results.

A production checklist for Ubuntu full-text search

  • Install MySQL with APT and verify the mysql service is active.
  • Confirm the server version and inspect option-file includes under /etc/mysql.
  • Use an InnoDB table with a FULLTEXT index covering every column named in MATCH().
  • Use natural-language mode for automatic relevance ranking and return the score when the UI needs ordering.
  • Use boolean mode for required, excluded, phrase, and trailing-prefix controls.
  • Check the three-character InnoDB and four-character MyISAM defaults before promising two-letter search.
  • Review stopword variables and tables for the language and vocabulary of your application.
  • Use the ngram parser for CJK text that lacks whitespace boundaries, and tune ngram_token_size.
  • Rebuild every affected index after changing token-size, parser, or stopword settings.
  • Test expected matches, expected nonmatches, phrases, prefixes, short codes, and common words on every server that serves search traffic.

Diagnose a failing search in a repeatable order

  1. Run SHOW CREATE TABLE and confirm a FULLTEXT index exists on the exact MATCH() columns.
  2. Execute the query directly with a known three-or-more-character, non-stopword term to separate connection problems from tokenization problems.
  3. Check the active engine and parser. A CJK collection using the built-in parser may not produce the segmentation you expect.
  4. Inspect innodb_ft_min_token_size, ngram_token_size, and the applicable stopword variables on the server that built the index.
  5. If settings changed, verify that MySQL was restarted where necessary and that the index was dropped and recreated afterward.
  6. Compare natural-language and boolean results. A boolean query can reveal whether a common term is being suppressed by MyISAM’s threshold or whether the expression needs an explicit operator.
  7. Test the application’s bound parameter and input normalization. Empty strings, punctuation-only input, and accidental leading operators can all change the parsed query.

This sequence avoids the common mistake of changing SQL syntax when the real issue is that the desired token was never indexed.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.