use VespaResult into query doc
{
"data": {
"text/plain": [
- "{'totalCount': 52387}"
+ "108882"
]
},
"execution_count": null,
}
],
"source": [
- "results[\"root\"][\"fields\"]"
+ "results.number_documents_retrieved"
]
},
{
{
"data": {
"text/plain": [
- "{'totalCount': 52387}"
+ "108882"
]
},
"execution_count": null,
}
],
"source": [
- "results[\"root\"][\"fields\"]"
+ "results.number_documents_retrieved"
]
},
{
{
"data": {
"text/plain": [
- "{'totalCount': 1084}"
+ "947"
]
},
"execution_count": null,
}
],
"source": [
- "results[\"root\"][\"fields\"]"
+ "results.number_documents_retrieved"
]
},
{
{
"data": {
"text/plain": [
- "[40215, 18456, 33692]"
+ "[117166, 60125, 28903]"
]
},
"execution_count": null,
}
],
"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"
]
},
{
"data": {
"text/plain": [
- "[18456, 33692]"
+ "[60125, 28903]"
]
},
"execution_count": null,
}
],
"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"
]
},
