add simple query section
")"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "response.status_code"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"response.json()"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Make a simple query"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from vespa.query import Query, OR, RankProfile\n",
+ "\n",
+ "results = app.query(\n",
+ " query=\"Where is my text?\", \n",
+ " query_model = Query(\n",
+ " match_phase=OR(), \n",
+ " rank_profile=RankProfile(name=\"default\")\n",
+ " )\n",
+ ")\n",
+ "\n",
+ "results.number_documents_retrieved"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "results.hits"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
