mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
fix(meilisearch): results will now properly paginate
This commit is contained in:
parent
428fd5bed8
commit
a2b6e9a6a8
2 changed files with 10 additions and 20 deletions
|
|
@ -153,7 +153,7 @@ const createMeiliMongooseModel = function ({ index, attributesToIndex }) {
|
|||
},
|
||||
{ _id: 1 },
|
||||
),
|
||||
);
|
||||
).lean();
|
||||
|
||||
// Add additional data from mongodb into Meili search hits
|
||||
const populatedHits = data.hits.map(function (hit) {
|
||||
|
|
@ -162,7 +162,7 @@ const createMeiliMongooseModel = function ({ index, attributesToIndex }) {
|
|||
const originalHit = _.find(hitsFromMongoose, query);
|
||||
|
||||
return {
|
||||
...(originalHit ? originalHit.toJSON() : {}),
|
||||
...(originalHit ?? {}),
|
||||
...hit,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue