Skip to content

Commit

Permalink
feat: only download root embedded docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Oct 25, 2024
1 parent 44c7741 commit aa7b873
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ function actionsBuilder(api) {
},
searchRoots({ state, commit, getters }, raw) {
const indices = state.indices.join(',')
const ids = compact(get(raw, 'hits.hits', []).map((hit) => hit._source.rootDocument))
const embedded = get(raw, 'hits.hits', []).filter((hit) => hit._source.extractionLevel > 0)
const ids = embedded.map((hit) => hit._source.rootDocument)
const source = ['contentType', 'contentLength', 'title', 'path']
return api.elasticsearch.ids(indices, ids, source)
},
Expand Down

0 comments on commit aa7b873

Please sign in to comment.