Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extension/fts/fts_indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static string IndexingScript(ClientContext &context, QualifiedName &qname, const
}

// create tokenize macro based on parameters
string tokenize = "s";
string tokenize = "s::VARCHAR";
vector<string> before;
vector<string> after;
if (strip_accents) {
Expand Down
17 changes: 17 additions & 0 deletions test/sql/fts/test_issue_10281.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# name: test/sql/fts/test_issue_10281.test
# description: Test issue #10281: Error when trying to create FTS index for column with struct data
# group: [fts]

require fts

statement ok
CREATE OR REPLACE TABLE data AS SELECT {'duck': 42} conversations, 42::bigint _id;

statement ok
PRAGMA create_fts_index('data', '_id', 'conversations');

# we should be able to retrieve the struct col
query I
SELECT _id FROM (SELECT *, fts_main_data.match_bm25(_id, 'duck') AS score FROM data) sq WHERE score IS NOT NULL ORDER BY score DESC;
----
42