Max limit for query_vector in kibana?

Hello,

Is there a maximum size for query_vector field in a search ? I am running into a behavior that I can't explain. Here are the details:

I'm running this on Kibana 8.13.2

Here are the 3 steps to reproduce :

  1. Index creation
PUT /bug_queryvector
{
  "mappings": {
    "properties": {
      "embedding": {
        "type": "dense_vector",
        "dims": 1024
      }
    }
  }
}
  1. Add products
    Add products to index · GitHub

  2. send the query:
    send query bug max query vector size · GitHub

And you see the following error :

{
  "error": {
    "root_cause": [
      {
        "type": "x_content_parse_exception",
        "reason": """[15:1] Unexpected end-of-input within/between Object entries
 at [Source: (org.elasticsearch.common.bytes.BytesReferenceStreamInput); line: 15, column: 1]"""
      }
    ],
    "type": "x_content_parse_exception",
    "reason": """[15:1] Unexpected end-of-input within/between Object entries
 at [Source: (org.elasticsearch.common.bytes.BytesReferenceStreamInput); line: 15, column: 1]""",
    "caused_by": {
      "type": "json_parse_exception",
      "reason": """Unexpected end-of-input within/between Object entries
 at [Source: (org.elasticsearch.common.bytes.BytesReferenceStreamInput); line: 15, column: 1]"""
    }
  },
  "status": 400
}

Also, on Kibana, I see that my array of vector becomes black and is not colored anymore after a while. Could it be a matter of length ? It is a 1024 size long array.

Here is the color changing behavior :

Would you have an idea about what it could come from ?

This embedding was copied from a terminal output.

I created another one using postman on my microservice and did copy its output there, and it just works. I guess there's a hidden character encoding somewhere.

Anyway it works !

1 Like

Thanks @Yoann_Buzenet for sharing your solution here.