Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: do brute force search on unindexed data #3036

Merged
merged 15 commits into from
Oct 31, 2024
Prev Previous commit
Next Next commit
fix
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
BubbleCal committed Oct 21, 2024

Verified

This commit was signed with the committer’s verified signature.
wjones127 Will Jones
commit 35c72e20c54bfcd53ad77657bfc02df2f2e111bd
13 changes: 12 additions & 1 deletion rust/lance/src/io/exec/fts.rs
Original file line number Diff line number Diff line change
@@ -202,6 +202,16 @@ pub struct FlatFtsExec {
properties: PlanProperties,
}

impl DisplayAs for FlatFtsExec {
fn fmt_as(&self, t: DisplayFormatType, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match t {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "FlatFts: query={}", self.query.query)
}
}
}
}

impl FlatFtsExec {
pub fn new(input: Arc<dyn ExecutionPlan>, column: String, query: FullTextSearchQuery) -> Self {
let properties = PlanProperties::new(
@@ -253,7 +263,8 @@ impl ExecutionPlan for FlatFtsExec {
let input_stream = self.input.execute(partition, context)?;

let stream = input_stream.map(move |batch| {
let batch = flat_full_text_search(&[batch], &column, &query.query)?;
let batch = batch?;
let batch = flat_full_text_search(&[&batch], &column, &query.query)?;

let batch = RecordBatch::try_new(
FTS_SCHEMA.clone(),