mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 19:02:58 +00:00
fix: metric type for python/node search api (#1689)
This commit is contained in:
@@ -17,6 +17,7 @@ import axios, { type AxiosResponse, type ResponseType } from 'axios'
|
||||
import { tableFromIPC, type Table as ArrowTable } from 'apache-arrow'
|
||||
|
||||
import { type RemoteResponse, type RemoteRequest, Method } from '../middleware'
|
||||
import { MetricType } from '..'
|
||||
|
||||
interface HttpLancedbClientMiddleware {
|
||||
onRemoteRequest(
|
||||
@@ -152,6 +153,7 @@ export class HttpLancedbClient {
|
||||
refineFactor?: number,
|
||||
columns?: string[],
|
||||
filter?: string,
|
||||
metricType?: MetricType,
|
||||
fastSearch?: boolean
|
||||
): Promise<ArrowTable<any>> {
|
||||
const result = await this.post(
|
||||
@@ -160,10 +162,11 @@ export class HttpLancedbClient {
|
||||
vector,
|
||||
k,
|
||||
nprobes,
|
||||
refineFactor,
|
||||
refine_factor: refineFactor,
|
||||
columns,
|
||||
filter,
|
||||
prefilter,
|
||||
metric: metricType,
|
||||
fast_search: fastSearch
|
||||
},
|
||||
undefined,
|
||||
|
||||
@@ -239,6 +239,7 @@ export class RemoteQuery<T = number[]> extends Query<T> {
|
||||
(this as any)._refineFactor,
|
||||
(this as any)._select,
|
||||
(this as any)._filter,
|
||||
(this as any)._metricType,
|
||||
(this as any)._fastSearch
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user