mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-21 05:50:41 +00:00
docs: improve the docs and API param name (#1629)
Signed-off-by: BubbleCal <bubble-cal@outlook.com>
This commit is contained in:
@@ -872,7 +872,7 @@ describe.each([arrow13, arrow14, arrow15, arrow16, arrow17])(
|
||||
];
|
||||
const table = await db.createTable("test", data);
|
||||
await table.createIndex("text", {
|
||||
config: Index.fts({ withPositions: false }),
|
||||
config: Index.fts({ withPosition: false }),
|
||||
});
|
||||
|
||||
const results = await table.search("hello").toArray();
|
||||
|
||||
@@ -142,7 +142,7 @@ export interface FtsOptions {
|
||||
* If set to false, the index will not store the positions of the tokens in the text,
|
||||
* which will make the index smaller and faster to build, but will not support phrase queries.
|
||||
*/
|
||||
withPositions?: boolean;
|
||||
withPosition?: boolean;
|
||||
}
|
||||
|
||||
export class Index {
|
||||
@@ -244,7 +244,7 @@ export class Index {
|
||||
* For now, the full text search index only supports English, and doesn't support phrase search.
|
||||
*/
|
||||
static fts(options?: Partial<FtsOptions>) {
|
||||
return new Index(LanceDbIndex.fts(options?.withPositions));
|
||||
return new Index(LanceDbIndex.fts(options?.withPosition));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user