generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What is the bug?
There is a knn query like
KnnQuery origin = new KnnQuery.Builder().field("field").vector(new float[] { 0.1f, 0.4f }).k(1).build();
When it serialize to json string, the result would be:
{"field":{"vector":[0.10000000149011612,0.4000000059604645],"k":1}}
like the test code shows:
Lines 16 to 20 in 4436e89
| public void toBuilderPrecision() { | |
| KnnQuery origin = new KnnQuery.Builder().field("field").vector(new float[] { 0.1f, 0.4f }).k(1).build(); | |
| assertEquals(toJson(origin), "{\"field\":{\"vector\":[0.1,0.4],\"k\":1}}"); | |
| } |
Do you have any additional context?
PR #882
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working