-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
This feature requires MongoDB Atlas to use Lucene search.
symfony-chatgpt-ux/src/Twig/Components/ChatsListComponent.php
Lines 26 to 40 in 1e51d3d
| /** | |
| * @return array{title: string, createdAt: \DateTimeImmutable, id: string}[] | |
| * @todo project only the fields we need, not the whole document with all messages | |
| * also use the atlas search for fuzzy search https://www.mongodb.com/docs/atlas/atlas-search/text/#fuzzy-examples | |
| */ | |
| public function getConversations(): iterable | |
| { | |
| return $this->documentManager->getRepository(Conversation::class) | |
| ->createQueryBuilder() | |
| ->field('title')->equals(new Regex($this->query ?? '', 'i')) | |
| ->sort('createdAt', 'desc') | |
| ->limit(20) | |
| ->getQuery() | |
| ->execute(); | |
| } |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed