full-text search: add a section about how search compares to contains
See original GitHub issueUnder the hood contains uses LIKE, search uses the full-text search capabilities of the database.
https://stackoverflow.com/questions/224714/what-is-full-text-search-vs-like
Full-Text Search also does stemming, given “Quick brown fox”
contains: "foxes"will return nothingsearch: "foxes"will return the result
Also if you add indexes, full text search can be quite a bit faster for querying.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Full-Text Search - SQL Server - Microsoft Learn
A full-text query returns any documents that contain at least one match (also known as a hit). A match occurs when a target...
Read more >Hands on Full-Text Search in SQL Server
Adding data to a Full-Text index is referred to as population. In contrast to normal indexes, these populations are not part of a...
Read more >MySQL Full text search - w3resource
MySQL Full text search: Full-Text Search in MySQL server lets users run full-text queries against character-based data in MySQL tables.
Read more >12.10 Full-Text Search Functions - MySQL :: Developer Zone
Full-text searching is performed using MATCH() AGAINST() syntax. MATCH() takes a comma-separated list that names the columns to be searched. AGAINST takes a ......
Read more >SQL Server Full Text Search Language Features - Simple Talk
SQL Full-text Search (SQL FTS) is an optional component of SQL Server 7 and later, which allows fast and efficient querying when you...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I would suggest that the documentation talk about how to handle multiple word searches (e.g.
Los Angelesneeds to be broken down intoLos | AngelesorLos & Angeles). The existing documentation somewhat hints at the need for this, but doesn’t explicitly state it. This is a common trap for people doing full text search for the first time.We should probably also talk about prefix matching, etc. such as adding
:*to each token if someone wants to match onLos Anfor Los Angeles or similar.Some reference material for common pain points: https://stackoverflow.com/questions/2513501/postgresql-full-text-search-how-to-search-partial-words https://czep.net/17/full-text-search.html
You’d need to split “Quick brown foxes” into words. There’s an example in https://github.com/prisma/docs/issues/2233