Skip to content

Commit 6a4b862

Browse files
authored
Merge branch 'master' into master
2 parents 2f1c705 + 5d7de9d commit 6a4b862

File tree

9 files changed

+306
-38
lines changed

9 files changed

+306
-38
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FlexSearch v0.8: [Overview and Migration Guide](doc/0.8.0.md)
2-
<h1></h1>
2+
3+
[<img src="https://devin.ai/assets/deepwiki-badge.png" alt="Ask DeepWiki.com" height="20"/>](https://deepwiki.com/nextapps-de/flexsearch)
4+
5+
<h2></h2>
36
<h1>
47
<img src="doc/flexsearch-logo-glass-animated.svg" style="width: 580px; max-width: 100%" alt="FlexSearch.js: Next-Generation full-text search library for Browser and Node.js">
58
<p></p>
@@ -38,13 +41,13 @@ FlexSearch has been helping developers around the world build powerful, efficien
3841

3942
<a href="https://antithesis.com" target="_blank" style="display: inline-block">
4043
<center>
41-
<img src="doc/antithesis_logo.svg" width="180" alt="Donate using Open Collective"><br>
44+
<img src="doc/antithesis_logo.svg" width="200" alt="Donate using Open Collective"><br>
4245
Antithesis Operations LLC
4346
</center>
4447
</a>
4548
<h1></h1>
4649

47-
FlexSearch performs queries up to 1,000,000 times faster <a href="https://nextapps-de.github.io/flexsearch/" target="_blank">compared to other libraries</a> by also providing <a href="https://nextapps-de.github.io/flexsearch/match.html" target="_blank">powerful search capabilities</a> like multi-field search (document search), phonetic transformations, partial matching, tag-search or suggestions.
50+
FlexSearch performs queries up to 1,000,000 times faster <a href="https://nextapps-de.github.io/flexsearch/" target="_blank">compared to other libraries</a> by also providing <a href="https://nextapps-de.github.io/flexsearch/match.html" target="_blank">powerful search capabilities</a> like multi-field search (document search), phonetic transformations, partial matching, tag-search, result highlighting or suggestions.
4851

4952
Bigger workloads are scalable through workers to perform any updates or queries to the index in parallel through dedicated balanced threads.
5053

@@ -561,9 +564,9 @@ The **_dist_** folder is located in: `node_modules/flexsearch/dist/`
561564
</tr>
562565
<tr>
563566
<td>File Size (gzip)</td>
564-
<td>14.0 kb</td>
565-
<td>9.0 kb</td>
566-
<td>4.4 kb</td>
567+
<td>16.3 kb</td>
568+
<td>11.4 kb</td>
569+
<td>4.5 kb</td>
567570
</tr>
568571
</table>
569572

index.d.ts

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ declare module "flexsearch" {
160160
LatinBalance: EncoderOptions,
161161
LatinAdvanced: EncoderOptions,
162162
LatinExtra: EncoderOptions,
163-
LatinSoundex: EncoderOptions
163+
LatinSoundex: EncoderOptions,
164+
CJK: EncoderOptions
164165
};
165166

166167
/**
@@ -199,7 +200,7 @@ declare module "flexsearch" {
199200
commit?: boolean;
200201

201202
// Language-specific Options and Encoding
202-
encoder?: typeof Charset | Encoders | EncoderOptions;
203+
encoder?: typeof Charset | Encoders | EncoderOptions | Encoder;
203204
encode?: (text: string) => string[],
204205
rtl?: boolean;
205206
};
@@ -598,34 +599,6 @@ declare module "flexsearch" {
598599
): Promise<DocumentSearchResults<D, R, E, M>>;
599600
}
600601

601-
type IdType =
602-
"text" |
603-
"char" |
604-
"varchar" |
605-
"string" |
606-
"number" |
607-
"numeric" |
608-
"integer" |
609-
"smallint" |
610-
"tinyint" |
611-
"mediumint" |
612-
"int" |
613-
"int8" |
614-
"uint8" |
615-
"int16" |
616-
"uint16" |
617-
"int32" |
618-
"uint32" |
619-
"int64" |
620-
"uint64" |
621-
"bigint";
622-
623-
type PersistentOptions = {
624-
name?: string;
625-
type?: IdType;
626-
db?: any;
627-
};
628-
629602
type DefaultResolve = {
630603
query?: string;
631604
limit?: number;
@@ -744,7 +717,53 @@ declare module "flexsearch" {
744717
export default FlexSearch;
745718
}
746719

720+
// -----------------------------------
721+
722+
type IdType =
723+
"text" |
724+
"char" |
725+
"varchar" |
726+
"string" |
727+
"number" |
728+
"numeric" |
729+
"integer" |
730+
"smallint" |
731+
"tinyint" |
732+
"mediumint" |
733+
"int" |
734+
"int8" |
735+
"uint8" |
736+
"int16" |
737+
"uint16" |
738+
"int32" |
739+
"uint32" |
740+
"int64" |
741+
"uint64" |
742+
"bigint";
743+
744+
type PersistentOptions = {
745+
name?: string;
746+
type?: IdType;
747+
db?: any;
748+
};
749+
750+
declare module "flexsearch/db/*" {
751+
export default StorageInterface;
752+
}
753+
754+
declare module "flexsearch/db/indexeddb" {
755+
export default class IndexedDB extends StorageInterface{
756+
db: IDBDatabase
757+
}
758+
}
759+
760+
// -----------------------------------
761+
762+
declare module "flexsearch/lang/*" {
763+
const Options: EncoderOptions;
764+
export default Options;
765+
}
766+
747767
// https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
748768
// https://github.com/futurGH/ts-to-jsdoc
749769
// https://sethmac.com/typescript-to-jsdoc/
750-

src/db/clickhouse/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
declare module "flexsearch/db/clickhouse" {
2+
3+
type IdType =
4+
"text" |
5+
"char" |
6+
"varchar" |
7+
"string" |
8+
"number" |
9+
"numeric" |
10+
"integer" |
11+
"smallint" |
12+
"tinyint" |
13+
"mediumint" |
14+
"int" |
15+
"int8" |
16+
"uint8" |
17+
"int16" |
18+
"uint16" |
19+
"int32" |
20+
"uint32" |
21+
"int64" |
22+
"uint64" |
23+
"bigint";
24+
25+
type PersistentOptions = {
26+
name?: string;
27+
type?: IdType;
28+
db?: any;
29+
};
30+
31+
export default class StorageInterface {
32+
constructor(name: string, config: PersistentOptions);
33+
constructor(config: string | PersistentOptions);
34+
//mount(index: Index | Document) : Promise<void>;
35+
open() : Promise<void>;
36+
close() : Promise<void>;
37+
destroy() : Promise<void>;
38+
clear() : Promise<void>;
39+
db: any;
40+
}
41+
}

src/db/indexeddb/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
declare module "flexsearch/db/indexeddb" {
2+
3+
type IdType =
4+
"text" |
5+
"char" |
6+
"varchar" |
7+
"string" |
8+
"number" |
9+
"numeric" |
10+
"integer" |
11+
"smallint" |
12+
"tinyint" |
13+
"mediumint" |
14+
"int" |
15+
"int8" |
16+
"uint8" |
17+
"int16" |
18+
"uint16" |
19+
"int32" |
20+
"uint32" |
21+
"int64" |
22+
"uint64" |
23+
"bigint";
24+
25+
type PersistentOptions = {
26+
name?: string;
27+
type?: IdType;
28+
db?: IDBDatabase;
29+
};
30+
31+
export default class StorageInterface {
32+
constructor(name: string, config: PersistentOptions);
33+
constructor(config: string | PersistentOptions);
34+
//mount(index: Index | Document) : Promise<void>;
35+
open() : Promise<void>;
36+
close() : Promise<void>;
37+
destroy() : Promise<void>;
38+
clear() : Promise<void>;
39+
db: IDBDatabase;
40+
}
41+
}

src/db/mongodb/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
declare module "flexsearch/db/mongodb" {
2+
3+
type IdType =
4+
"text" |
5+
"char" |
6+
"varchar" |
7+
"string" |
8+
"number" |
9+
"numeric" |
10+
"integer" |
11+
"smallint" |
12+
"tinyint" |
13+
"mediumint" |
14+
"int" |
15+
"int8" |
16+
"uint8" |
17+
"int16" |
18+
"uint16" |
19+
"int32" |
20+
"uint32" |
21+
"int64" |
22+
"uint64" |
23+
"bigint";
24+
25+
type PersistentOptions = {
26+
name?: string;
27+
type?: IdType;
28+
db?: any;
29+
};
30+
31+
export default class StorageInterface {
32+
constructor(name: string, config: PersistentOptions);
33+
constructor(config: string | PersistentOptions);
34+
//mount(index: Index | Document) : Promise<void>;
35+
open() : Promise<void>;
36+
close() : Promise<void>;
37+
destroy() : Promise<void>;
38+
clear() : Promise<void>;
39+
db: any;
40+
}
41+
}

src/db/postgres/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
declare module "flexsearch/db/postgres" {
2+
3+
type IdType =
4+
"text" |
5+
"char" |
6+
"varchar" |
7+
"string" |
8+
"number" |
9+
"numeric" |
10+
"integer" |
11+
"smallint" |
12+
"tinyint" |
13+
"mediumint" |
14+
"int" |
15+
"int8" |
16+
"uint8" |
17+
"int16" |
18+
"uint16" |
19+
"int32" |
20+
"uint32" |
21+
"int64" |
22+
"uint64" |
23+
"bigint";
24+
25+
type PersistentOptions = {
26+
name?: string;
27+
type?: IdType;
28+
db?: any;
29+
};
30+
31+
export default class StorageInterface {
32+
constructor(name: string, config: PersistentOptions);
33+
constructor(config: string | PersistentOptions);
34+
//mount(index: Index | Document) : Promise<void>;
35+
open() : Promise<void>;
36+
close() : Promise<void>;
37+
destroy() : Promise<void>;
38+
clear() : Promise<void>;
39+
db: any;
40+
}
41+
}

src/db/redis/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
declare module "flexsearch/db/redis" {
2+
3+
type IdType =
4+
"text" |
5+
"char" |
6+
"varchar" |
7+
"string" |
8+
"number" |
9+
"numeric" |
10+
"integer" |
11+
"smallint" |
12+
"tinyint" |
13+
"mediumint" |
14+
"int" |
15+
"int8" |
16+
"uint8" |
17+
"int16" |
18+
"uint16" |
19+
"int32" |
20+
"uint32" |
21+
"int64" |
22+
"uint64" |
23+
"bigint";
24+
25+
type PersistentOptions = {
26+
name?: string;
27+
type?: IdType;
28+
db?: any;
29+
};
30+
31+
export default class StorageInterface {
32+
constructor(name: string, config: PersistentOptions);
33+
constructor(config: string | PersistentOptions);
34+
//mount(index: Index | Document) : Promise<void>;
35+
open() : Promise<void>;
36+
close() : Promise<void>;
37+
destroy() : Promise<void>;
38+
clear() : Promise<void>;
39+
db: any;
40+
}
41+
}

src/db/sqlite/index.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
declare module "flexsearch/db/sqlite" {
2+
3+
type IdType =
4+
"text" |
5+
"char" |
6+
"varchar" |
7+
"string" |
8+
"number" |
9+
"numeric" |
10+
"integer" |
11+
"smallint" |
12+
"tinyint" |
13+
"mediumint" |
14+
"int" |
15+
"int8" |
16+
"uint8" |
17+
"int16" |
18+
"uint16" |
19+
"int32" |
20+
"uint32" |
21+
"int64" |
22+
"uint64" |
23+
"bigint";
24+
25+
type PersistentOptions = {
26+
name?: string;
27+
type?: IdType;
28+
db?: any;
29+
};
30+
31+
export default class StorageInterface {
32+
constructor(name: string, config: PersistentOptions);
33+
constructor(config: string | PersistentOptions);
34+
//mount(index: Index | Document) : Promise<void>;
35+
open() : Promise<void>;
36+
close() : Promise<void>;
37+
destroy() : Promise<void>;
38+
clear() : Promise<void>;
39+
db: any;
40+
}
41+
}

0 commit comments

Comments
 (0)