mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 05:58:56 +08:00
feat(infra): collect more data to indexer (#8528)
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
import type { FieldType } from './field-type';
|
||||
|
||||
export type Schema = Record<string, FieldType>;
|
||||
export type Schema = Record<
|
||||
string,
|
||||
| FieldType
|
||||
| {
|
||||
type: FieldType;
|
||||
/**
|
||||
* If false, the field will not be indexed, and thus not searchable.
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
index?: boolean;
|
||||
/**
|
||||
* If false, the field will not be stored, and not included in the search result.
|
||||
*
|
||||
* default: true
|
||||
*/
|
||||
store?: boolean;
|
||||
}
|
||||
>;
|
||||
|
||||
export function defineSchema<T extends Schema>(schema: T): T {
|
||||
return schema;
|
||||
|
||||
Reference in New Issue
Block a user