summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authortmartins <thigm85@gmail.com>2020-06-11 12:42:31 +0200
committertmartins <thigm85@gmail.com>2020-06-11 12:42:31 +0200
commitfb849e02c9de60df85161349918030589a6f3b2b (patch)
tree3e107b234ba56ba8635ad5358096f57b48758359 /python
parenta33169859cb5d3809db4fd592916c77941499e55 (diff)
use VespaResult into query doc
Diffstat (limited to 'python')
-rw-r--r--python/vespa/notebooks/query.ipynb20
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"
]
},