Skip to content

Conversation

@CaroFG
Copy link
Contributor

@CaroFG CaroFG commented Nov 20, 2025

Pull Request

Related issue

What does this PR do?

  • Adds guide on setting up Meilisearch with Gemini embeddings to enable semantic search capabilities

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Comment on lines 35 to 36
}
"url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:batchEmbedContents",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing comma after the headers object in the Gemini embedder guide's JSON configuration, leading to invalid JSON.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The Gemini embedder guide contains a critical JSON syntax error. Specifically, there is a missing comma after the closing brace } of the "headers" object, before the "url" key. This invalidates the JSON structure, causing JSON parsers to reject the configuration. Users attempting to apply this configuration via the Meilisearch API will encounter parsing failures, preventing them from setting up Gemini embeddings and enabling the semantic search feature described in the guide.

💡 Suggested Fix

Add a comma , after the closing brace } of the "headers" object on line 35 in guides/embedders/gemini.mdx, before the "url" key, to correct the JSON syntax.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: guides/embedders/gemini.mdx#L35-L36

Potential issue: The Gemini embedder guide contains a critical JSON syntax error.
Specifically, there is a missing comma after the closing brace `}` of the `"headers"`
object, before the `"url"` key. This invalidates the JSON structure, causing JSON
parsers to reject the configuration. Users attempting to apply this configuration via
the Meilisearch API will encounter parsing failures, preventing them from setting up
Gemini embeddings and enabling the semantic search feature described in the guide.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference_id: 2839307

Comment on lines +6 to +9
## Introduction

This guide will walk you through the process of setting up Meilisearch with Gemini embeddings to enable semantic search capabilities. By leveraging Meilisearch's AI features and Gemini's embedding API, you can enhance your search experience and retrieve more relevant results.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can skip the intro. The description is already printed on the page.

Suggested change
## Introduction
This guide will walk you through the process of setting up Meilisearch with Gemini embeddings to enable semantic search capabilities. By leveraging Meilisearch's AI features and Gemini's embedding API, you can enhance your search experience and retrieve more relevant results.

To follow this guide, you'll need:

- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13
- A Google account with an API key for embedding generation. You can sign up for a Google account at [Google](https://google.com/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- A Google account with an API key for embedding generation. You can sign up for a Google account at [Google](https://google.com/).
- A Google account with an API key for embedding generation. You can sign up for a Google account at [Google](https://google.com/)


- A [Meilisearch Cloud](https://www.meilisearch.com/cloud) project running version >=1.13
- A Google account with an API key for embedding generation. You can sign up for a Google account at [Google](https://google.com/).
- No backend required.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of specifying something isn't required in the requirements section. (I know the other AI guides do that, but it's something I want to change when I have the time).

Suggested change
- No backend required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants