Experimental feature
Studio search config
Define specific weights on fields/paths in the Studio
You can define specific weights on fields/paths for document types.
Since the API is not stable yet, and likely subject to change, it's configurable on the __experimental_search
property for schema document types. Here's an example:
{
type: 'document',
name: 'author',
fields: [
{name: 'name', type: 'string'},
// ...
],
__experimental_search: [
{weight: 1.2, path: 'name'}
]
// ...
}
- The weight is a global multiplier across all document types, so if
name
on typecustomer
has a weight of2
, andname
on typeauthor
has a weight of4
, documents of typeauthor
will be ranked higher than documents of typecustomer
, even if theirname
fields equally matches what the user searched for. - If no search config is specified on a document type, it gets derived from the preview config (which again is derived by default through schema introspection).
- We have also united the reference search with the global search, so that they both follow the same ranking/weighting rules.