Support for full text search indexes
See original GitHub issuePostgres, sqlite, and MySQL all support some form of full-text index. It would be useful to support generating schema for and querying based on these indexes.
This does not seem like a trivial feature, as the implementations are very different for index creation requirements (sqlite appears to be at the table-level, MySQL only supports it on MyISAM tables) and querying.
That said, this issue could at least be used to track interest for such a feature.
References:
- PostgreSQL: http://www.postgresql.org/docs/8.3/static/textsearch.html
- MySQL: https://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
- sqlite: https://www.sqlite.org/fts3.html
Example index creation and querying:
- PostgreSQL:
CREATE INDEX <INDEX NAME> ON <TABLE NAME> USING gin(to_tsvector(<COLUMN NAME>));
SELECT * FROM <TABLE NAME> WHERE <COLUMN NAME> @@ to_tsquery(<INPUT>);
- MySQL:
CREATE FULLTEXT INDEX <INDEX NAME> ON <TABLE NAME>;
SELECT * FROM <TABLE NAME> WHERE MATCH <COLLUMN NAME> AGAINST <INPUT>;
- sqlite:
CREATE VIRTUAL TABLE <TABLE> USING fts3(<COLUMN NAME> TEXT);
SELECT * FROM <TABLE NAME> WHERE <COLUMN NAME> MATCH <INPUT>;
Issue Analytics
- State:
- Created 10 years ago
- Reactions:46
- Comments:37 (17 by maintainers)
Top Results From Across the Web
12.10 Full-Text Search Functions
MySQL has support for full-text indexing and searching: ... Full-text searching is performed using MATCH() AGAINST() syntax. MATCH() takes a comma-separated list ...
Read more >What is Full-Text Search and How Does it Work?
Full -text search refers to searching some text inside extensive text data stored electronically and returning results that contain some or all of...
Read more >Full-Text Search - SQL Server
Full -text search is powered by the Full-Text Engine. The Full-Text Engine has two roles: indexing support and querying support. Full-Text ...
Read more >Full-text search index - Cypher Manual
Full -text indexes are powered by the Apache Lucene indexing and search library, and can be used to index nodes and relationships by...
Read more >Documentation: 15: Chapter 12. Full Text Search
Chapter 12. Full Text Search ... 12.3. Controlling Text Search ... 12.9. Preferred Index Types for Text Search · 12.10. psql Support ·...
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 FreeTop 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
Top GitHub Comments
removed flood +1 and status update request comments, please use thumbs for voting
EDIT: if there are no new messages in this feed, then there is nothing new to tell
This issue was the top hit for many of the searches I did, but didn’t address my question. For those who also end up here for the same reason…
Postgres users can add a full text index to a tsvector column using the third argument to
table.index
. For example:Also see:
https://knexjs.org/#Schema-index
and
https://stackoverflow.com/questions/45871474/how-to-add-gin-index-using-knex-js