Skip to content

Commit

Permalink
fix: refine FTS error message if no index (#3027)
Browse files Browse the repository at this point in the history
fix #3015

Signed-off-by: BubbleCal <[email protected]>
  • Loading branch information
BubbleCal authored Oct 21, 2024
1 parent f9024ce commit fccb2d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rust/lance/src/dataset/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,13 @@ impl Scanner {
query.columns.clone()
};

if columns.is_empty() {
return Err(Error::invalid_input(
"Cannot perform full text search unless an INVERTED index has been created on at least one column".to_string(),
location!(),
));
}

// Now the full text search supports only one column
if columns.len() != 1 {
return Err(Error::invalid_input(
Expand Down

0 comments on commit fccb2d3

Please sign in to comment.