cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.96k stars 3.79k forks source link

sql: support tsvector, tsquery based full text search #41288

Closed rohany closed 4 months ago

rohany commented 5 years ago

Postgres has some advanced text search types and features that Django uses that we we don't support -- https://www.postgresql.org/docs/10/functions-textsearch.html https://www.postgresql.org/docs/10/datatype-textsearch.html

This includes the tsvector and regconfig types and operations on them.

And SQL operators for tsvector:

Jira issue: CRDB-5464 Epic: CRDB-22357

github-actions[bot] commented 3 years ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 5 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!

giangpham712 commented 1 year ago

@fqazi unsupported function array_to_tsvector affects efcore.pg tests

fqazi commented 1 year ago

@giangpham712 Can you confirm if we need anything else here, this might be one of the easier ones to address

giangpham712 commented 1 year ago

@fqazi Related to full text search, we have multiple issues

Unsupported features:

array_to_tsvector
setweight
ts_delete
ts_headline
regconfig
regdictionary
length(tsvector)
numnode
querytree
ts_rank_cd
ts_rewrite
tsquery_phrase
strip
websearch_to_tsquery
unaccent(string, varchar)

Other issues:

unsupported comparison operator: to_tsvector("ContactTitle") @@ to_tsquery('owner') || to_tsquery('foo'): unsupported 
binary operator: <tsquery> || <tsquery>
unsupported comparison operator: <tsquery> && <tsquery>
unsupported comparison operator: <tsquery> @> <tsquery>
unsupported comparison operator: <tsquery> <@ <tsquery>
unsupported binary operator: <tsquery> || <tsquery>
unsupported binary operator: <tsvector> || <tsvector>
SELECT !!to_tsquery('a & b')
FROM "Customers" AS c
LIMIT 1

returns error plainto_tsquery(): text-search query doesn't contain lexemes: a

fqazi commented 1 year ago

@giangpham712 Let's skip tests with tsvector for now, let me follow up with the queries team for the issue you found