Skip to content

Commit

Permalink
Added deserialization test
Browse files Browse the repository at this point in the history
Signed-off-by: uri.nudelman <[email protected]>
  • Loading branch information
uriofferup committed Aug 13, 2024
1 parent 31309c8 commit 73ea1af
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public void testNeuralQueryFromJson() {
+ " \"neural\": {\n"
+ " \"passage_embedding\": {\n"
+ " \"query_text\": \"Hi world!\",\n"
+ " \"query_image\": \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+L+U4T8ABu8CpCYJ1DQAAAAASUVORK5CYII=\",\n"
+ " \"model_id\": \"bQ1J8ooBpBj3wT4HVUsb\",\n"
+ " \"k\": 100\n"
+ " }\n"
Expand All @@ -245,6 +246,10 @@ public void testNeuralQueryFromJson() {

assertEquals("passage_embedding", searchRequest.query().neural().field());
assertEquals("Hi world!", searchRequest.query().neural().queryText());
assertEquals(
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAA1JREFUGFdj+L+U4T8ABu8CpCYJ1DQAAAAASUVORK5CYII=",
searchRequest.query().neural().queryImage()
);
assertEquals("bQ1J8ooBpBj3wT4HVUsb", searchRequest.query().neural().modelId());
assertEquals(100, searchRequest.query().neural().k());
}
Expand Down

0 comments on commit 73ea1af

Please sign in to comment.