-
Notifications
You must be signed in to change notification settings - Fork 64
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Description
Currently it is only possible to change the MeiliSearch settings of an index by making an API request to MeiliSearch after a collection type is indexed. It would be nice to extend the MeiliSearch object that was added with the 0.4.0 release with optional MeiliSearch settings.
Basic example
With the 0.4.0 release it is now possible to transform the content-types before inserting them into MeiliSearch by using the following code.
module.exports = {
meilisearch: {
transformEntry({ entry, model }) {
return sanitizeEntity(entry, { model })
},
},
}By adding a settings property it would be possible to update the MeiliSearch settings after a content type gets indexed. For example:
module.exports = {
meilisearch: {
transformEntry({ entry, model }) {
return sanitizeEntity(entry, { model })
},
settings: {
rankingRules: ['typo', 'words', 'proximity', 'attribute', 'wordsPosition', 'exactness', 'desc(release_date)'],
filterableAttributes: ['genres'],
distinctAttribute: null,
searchableAttributes: ['title', 'description', 'genres'],
displayedAttributes: ['title', 'description', 'genre', 'release_date'],
stopWords: null,
synonyms: {
wolverine: ['xmen', 'logan'],
logan: ['wolverine', 'xmen']
}
}
},
}Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers