mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
testing: mongo meilisearch
This commit is contained in:
parent
c27554ed2e
commit
dcc13daf67
9 changed files with 654 additions and 3 deletions
13
api/server/routes/search.js
Normal file
13
api/server/routes/search.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const { Message } = require('../../models/Message');
|
||||
|
||||
router.get('/sync', async function (req, res) {
|
||||
console.log(Message);
|
||||
await Message.syncWithMeili();
|
||||
const result = await Message.meiliSearch({ query: 'computing' });
|
||||
console.log(result);
|
||||
res.send(result);
|
||||
})
|
||||
|
||||
module.exports = router;
|
||||
Loading…
Add table
Add a link
Reference in a new issue