diff --git a/docs/search/filtering.mdx b/docs/search/filtering.mdx index 350b302..3aaceb4 100644 --- a/docs/search/filtering.mdx +++ b/docs/search/filtering.mdx @@ -198,6 +198,23 @@ path must be wrapped in backticks. AND `nested with space`.`inner with space` < 2 ``` +You can also escape identifiers with SQL-standard double quotes (`"`). LanceDB rewrites +double-quoted identifiers to backticks before running the filter, so the two forms are +equivalent. Single quotes (`'`) always denote string literals, never identifiers. + +```sql +"UpperCaseName" = '3' AND "column name with space" IS NOT NULL +``` + +Double-quoted identifiers work in every operation that accepts a filter: search +filters, row counts, updates, deletes, and merge insert conditions. + + +In older SDK versions, double-quoted tokens were parsed as string literals. A filter +like `"UpperCaseName" = '3'` compared two strings and silently matched no rows. If you +target older versions, use backticks to escape identifiers. + + Field names containing periods (.) are NOT supported.