diff options
-rw-r--r-- | python/vespa/notebooks/query.ipynb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/python/vespa/notebooks/query.ipynb b/python/vespa/notebooks/query.ipynb index 2ecb4b9419f..27053527b52 100644 --- a/python/vespa/notebooks/query.ipynb +++ b/python/vespa/notebooks/query.ipynb @@ -79,7 +79,7 @@ { "data": { "text/plain": [ - "{'totalCount': 52387}" + "108882" ] }, "execution_count": null, @@ -88,7 +88,7 @@ } ], "source": [ - "results[\"root\"][\"fields\"]" + "results.number_documents_retrieved" ] }, { @@ -130,7 +130,7 @@ { "data": { "text/plain": [ - "{'totalCount': 52387}" + "108882" ] }, "execution_count": null, @@ -139,7 +139,7 @@ } ], "source": [ - "results[\"root\"][\"fields\"]" + "results.number_documents_retrieved" ] }, { @@ -190,7 +190,7 @@ { "data": { "text/plain": [ - "{'totalCount': 1084}" + "947" ] }, "execution_count": null, @@ -199,7 +199,7 @@ } ], "source": [ - "results[\"root\"][\"fields\"]" + "results.number_documents_retrieved" ] }, { @@ -224,7 +224,7 @@ { "data": { "text/plain": [ - "[40215, 18456, 33692]" + "[117166, 60125, 28903]" ] }, "execution_count": null, @@ -233,7 +233,7 @@ } ], "source": [ - "top_ids = [hit[\"fields\"][\"id\"] for hit in results[\"root\"][\"children\"][0:3]]\n", + "top_ids = [hit[\"fields\"][\"id\"] for hit in results.hits[0:3]]\n", "top_ids" ] }, @@ -270,7 +270,7 @@ { "data": { "text/plain": [ - "[18456, 33692]" + "[60125, 28903]" ] }, "execution_count": null, @@ -279,7 +279,7 @@ } ], "source": [ - "id_recalled = [hit[\"fields\"][\"id\"] for hit in results_with_recall[\"root\"][\"children\"]]\n", + "id_recalled = [hit[\"fields\"][\"id\"] for hit in results_with_recall.hits]\n", "id_recalled" ] }, |