Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for hex representation for mixed tensors in queries #32231

Open
jobergum opened this issue Aug 23, 2024 · 0 comments
Open

Add support for hex representation for mixed tensors in queries #32231

jobergum opened this issue Aug 23, 2024 · 0 comments
Assignees
Milestone

Comments

@jobergum
Copy link
Member

We support hex format in document JSON but not for queries.

{
    "put": "id:doc:doc::1",
    "fields": {
        "text": "To transport goods on water, use a boat",
        "embedding": {
            "0": "3DE38E393E638E393EAAAAAB",
            "1": "3EE38E393F0E38E43F2AAAAB",
            "2": "3F471C723F638E393F800000"
        }
    }
}

Is valid, but attempting to send this format in queries will throw a 400 bad request

vespa query 'yql=select * from doc where true' 'ranking=full' 'input.query(qt)={"0":"3DE38E393E638E393EAAAAAB"}'
{ "errors": [
            {
                "code": 3,
                "summary": "Illegal query",
                "message": "Could not set 'ranking.features.query(qt)' to '{\"0\":\"3DE38E393E638E393EAAAAAB\"}': Could not parse '{\"0\":\"3DE38E393E638E393EAAAAAB\"}' as a tensor of type tensor<float>(querytoken{},v[3]): At value position 0: Expected a '[' but got '\"'"
            }
]}
@kkraune kkraune added this to the soon milestone Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants