typesense / typesense/typesense

vector_query parameters with auto embedding docs

Open
#1,099 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
26.6k
Forks
973
Avg merge
18h 45m
Merged PRs (30d)
4

Description

Description

I use v0.25.0.rc46 with auto embedding and I have deployed the paraphrase-multilingual-mpnet-base-v2 model.

When I use vector_query I get this error - >

{
    "results": [
        {
            "code": 400,
            "error": "Query field `embedding` must have 768 dimensions."
        }
    ]
}

Steps to reproduce

curl "http://localhost:8108/multi_search" \
       -X POST \
       -H "Content-Type: application/json" \
       -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
       -d '{
  "searches": [
    {
      "collection": "products",
      "q": "tree",
      "query_by": "embedding",
      "exclude_fields": "embedding",
      "vector_query": "embedding:([0.96826, 0.94, 0.39557, 0.306488], k:100)",
      "prefix": false
    }
  ]
}'

Schema

{
  "name": "products",
  "fields": [
    {
      "name": "title",
      "type": "string",
      "locale": "sr"
    },
    {
      "name": "embedding",
      "type": "float[]",
      "embed": {
        "from": [
          "title"
        ],
        "model_config": {
          "model_name": "ts/paraphrase-multilingual-mpnet-base-v2"
        }
      }
    }
  ]
}

Expected Behavior

Actual Behavior

Metadata

Typesense Version:

OS:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the multi_search curl reproduction, the products schema, and the vector_query parameters shown in the issue. Investigate how auto-embedded fields validate query dimensions for the deployed model; the issue's blank expected and actual behavior sections need clarification. Done should include a confirmed resolution and clear documentation of the supported vector_query usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.