feat: improve search experience

This commit is contained in:
Thea Schöbl
2025-09-09 18:37:32 +00:00
20 changed files with 230 additions and 158 deletions

View File

@@ -97,6 +97,8 @@
"date",
"validatable",
"filterable",
"suggestable",
"completable",
"inheritTags",
"minLength",
"pattern",

View File

@@ -24,6 +24,11 @@ export interface SCSearchResult {
*/
data: SCThings[];
/**
* Suggestions for query corrections
*/
suggestions?: SCSearchSuggestions;
/**
* Facets (aggregations over all matching data)
*/
@@ -40,6 +45,18 @@ export interface SCSearchResult {
stats: SCSearchResultSearchEngineStats;
}
/**
* Seach suggestions
*
* Not to be confused with search-as-you-type suggestions
*/
export interface SCSearchSuggestions {
/**
* Suggestions for query terms that might have been misspelled
*/
terms?: Record<string, string[]>;
}
/**
* Stores information about Pagination
*/

View File

@@ -63,7 +63,7 @@ export interface SCThingWithoutReferences {
/**
* Alternate names of the thing
* @filterable
* @keyword
* @text
*/
alternateNames?: string[];
@@ -92,6 +92,8 @@ export interface SCThingWithoutReferences {
* @filterable
* @minLength 1
* @sortable ducet
* @completable
* @suggestable
* @text
*/
name: string;
@@ -240,6 +242,8 @@ export interface SCThingTranslatableProperties {
* Translation of the name of the thing
* @sortable ducet
* @text
* @suggestable
* @completable
*/
name?: string;
/**