Skip to content

Commit

Permalink
fix: text content is not indexed to meilisearch for some providers
Browse files Browse the repository at this point in the history
  • Loading branch information
sarisia committed Dec 26, 2024
1 parent 9b118d4 commit 113f05a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/models/plugins/mongoMeili.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ const createMeiliMongooseModel = function ({ index, attributesToIndex }) {

if (object.content && Array.isArray(object.content)) {
object.text = object.content
.filter((item) => item.type === 'text' && item.text && item.text.value)
.map((item) => item.text.value)
.filter((item) => item.type === 'text' && item.text)
.map((item) => typeof item.text === 'string' ? item.text : item.text.value)
.join(' ');
delete object.content;
}
Expand Down

0 comments on commit 113f05a

Please sign in to comment.