diff --git a/app/common.js b/app/common.js index f5848f8..2f60ff8 100644 --- a/app/common.js +++ b/app/common.js @@ -4,6 +4,45 @@ import { languages } from 'monaco-editor/esm/vs/editor/editor.api.js'; const urlSettingsPrefix = 'https://docs.meilisearch.com/reference/api/settings'; export const indexSettings = [ + { + name: 'displayedAttributes', + schema: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, + { + name: 'distinctAttribute', + schema: { + type: ['string', 'null'], + }, + }, + { + name: 'faceting', + schema: { + type: 'object', + properties: { + maxValuesPerFacet: { + type: 'integer', + }, + }, + required: ['maxValuesPerFacet'], + additionalProperties: false, + }, + }, + { + name: 'filterableAttributes', + schema: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, { name: 'pagination', schema: { @@ -17,6 +56,36 @@ export const indexSettings = [ additionalProperties: false, }, }, + { + name: 'rankingRules', + schema: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, + { + name: 'searchableAttributes', + schema: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, + { + name: 'sortableAttributes', + schema: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, { name: 'stopWords', schema: { @@ -27,6 +96,53 @@ export const indexSettings = [ uniqueItems: true, }, }, + { + name: 'synonyms', + schema: { + type: 'object', + additionalProperties: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, + }, + { + name: 'typoTolerance', + schema: { + type: 'object', + properties: { + enabled: { + type: 'boolean', + }, + minWordSizeForTypos: { + type: 'object', + properties: { + oneTypo: { type: 'integer' }, + twoTypos: { type: 'integer' }, + }, + additionalProperties: false, + }, + disableOnWords: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + disableOnAttributes: { + type: 'array', + items: { + type: 'string', + }, + uniqueItems: true, + }, + }, + additionalProperties: false, + }, + }, ].map((item) => { item.uri = item.schema.$id = `${urlSettingsPrefix}/${dasherize(item.name)}`; item.fileMatch = [item.uri];