Skip to content

Commit

Permalink
feat(api-headless-cms): disable full text search on certain field (#3631
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brunozoric committed Oct 27, 2023
1 parent 73ee250 commit 9013c2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const buildSearchableFieldList = (params: BuildParams): string[] => {
/**
* If not searchable, continue further.
*/
if (!plugin.fullTextSearch) {
if (!plugin.fullTextSearch || field.settings?.disableFullTextSearch === true) {
return result;
}

Expand Down
4 changes: 4 additions & 0 deletions packages/api-headless-cms/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ export interface CmsModelFieldSettings {
* Date field.
*/
type?: string;
/**
* Disable full text search explicitly on this field.
*/
disableFullTextSearch?: boolean;
/**
* There are a lot of other settings that are possible to add, so we keep the type opened.
*/
Expand Down

0 comments on commit 9013c2c

Please sign in to comment.