fix missing search fields

This commit is contained in:
keyan 2022-09-28 11:28:53 -05:00
parent 257303903f
commit 52fab60cda
1 changed files with 3 additions and 2 deletions

View File

@ -529,8 +529,9 @@ export default {
} }
// return highlights // return highlights
const items = sitems.body.hits.hits.map(e => { const items = sitems.body.hits.hits.map(async e => {
const item = e._source // this is super inefficient but will suffice until we do something more generic
const item = await getItem(parent, { id: e._source.id }, { me, models })
item.searchTitle = (e.highlight.title && e.highlight.title[0]) || item.title item.searchTitle = (e.highlight.title && e.highlight.title[0]) || item.title
item.searchText = (e.highlight.text && e.highlight.text[0]) || item.text item.searchText = (e.highlight.text && e.highlight.text[0]) || item.text