GromNaN / symfony-chatgpt-ux

🤩 ChatGPT clone using OpenAI API, built with Symfony UX and MongoDB
MIT License
25 stars 0 forks source link

Use MongoDB fuzzy search feature to filter the chats list #1

Open GromNaN opened 1 year ago

GromNaN commented 1 year ago

This feature requires MongoDB Atlas to use Lucene search.

https://github.com/GromNaN/symfony-chatgpt-ux/blob/1e51d3df33ba9b4ac7744cb9247df4fd1c738215/src/Twig/Components/ChatsListComponent.php#L26-L40

GromNaN commented 1 year ago

The index must be created in Atlas first. Doctrine ODM & MongoDB Driver doesn't seems to provide a way to create the index by code.

{
  index: 'default',
  text: {
    query: 'SymfonyGPT',
    path: 'title',
    fuzzy: {}
  }
}