mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
75b2f22add
5008: Display vectors when no custom vectors where ever provided r=irevoire a=dureuill # Pull Request ## Related issue Fixes the issue reported on [Discord](https://discord.com/channels/1006923006964154428/1294653031958446080/1295336784896589967). ## What does this PR do? - Normal behavior of Meilisearch is to hide `_vectors` even when `retrieveVectors: true` when there is an explicit list of displayed attributes that does not contain vectors - However, this relied on the field id for the `_vectors` field to exist, which wasn't the case when no `_vectors` was manually provided to documents. This would often be the case for people using autoembedders such as the OpenAI integration. - This PR fixes the behavior by looking for the `_vectors` string in the `displayedAttributes` when there is no `_vectors` fid. - This PR also adds a test for this specific situation, that would fail before the PR, and pass after the PR Co-authored-by: Louis Dureuil <louis@meilisearch.com>