documentation icon indicating copy to clipboard operation
documentation copied to clipboard

document how to create vector data from the embedder

Open tacman opened this issue 6 months ago • 3 comments

The documentation for a hybrid or pure semantic search references sending vector data, but there's no documentation on how to create that data with the configured embedders.

Surely this is being done internally. I think there would be some value to exposing a method to do that.

Also, when the search query has

        "retrieveVectors" => true,

the vectors are returned for the results, but not for the query itself. It seems appropriate that it would.

tacman avatar Jun 04 '25 15:06 tacman

Hello @tacman and thanks for creating this issue.

Could you link the specific articles you're referring to?

In general, though, there are two main pathways for using vector search:

  1. Going through a third-party service such as openAI. In this case, Meilisearch automatically generates all vector data during indexing (for vectorizing documents) and search (for vectorizing the request's q).
  2. Using a custom embedder you are running yourself. In this case, users must handle vectorization themselves

If following route #1, vector data generation is abstracted away and not a concern for Meilisearch users. At least outside of debugging situations.

Regarding retrieveVectors behaviour, I'm passing it along to the @meilisearch/product-team so they can process your feedback and possibly update the API in the near future.

guimachiavelli avatar Jun 24 '25 17:06 guimachiavelli

Hi @tacman 👋

the vectors are returned for the results, but not for the query itself. It seems appropriate that it would.

This makes sense and should be a small change, we might be able to squeeze it in. I'll keep you in the loop!

macraig avatar Jun 25 '25 15:06 macraig

Thanks! Although I don't know what I'm doing, but gut feeling is that it might be valuable for caching.

tacman avatar Jun 26 '25 09:06 tacman