Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
chatman committed Aug 1, 2020
1 parent f9f0400 commit e2d078f
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions Apache_Solr_with_Yasa_Dashboard.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Apache Solr with Yasa Dashboard",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyNqTKoOcd40YYXkXIdC5/Vr",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/TheSearchStack/notebooks/blob/master/Apache_Solr_with_Yasa_Dashboard.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "O2VKHzwKcHyr",
"colab_type": "text"
},
"source": [
"# Download and run Solr 8.6.0"
]
},
{
"cell_type": "code",
"metadata": {
"id": "xghd8i5tqI_R",
"colab_type": "code",
"colab": {}
},
"source": [
"# Download and run Solr 8.6.0\n",
"!apt update -qq && apt install -qq openjdk-11-jdk -y && wget -nv https://archive.apache.org/dist/lucene/solr/8.6.0/solr-8.6.0.tgz && tar -xf solr-8.6.0.tgz\n",
"!cd solr-8.6.0/ && bin/solr -c -Denable.packages=true -force\n",
"\n",
"# Serve Solr's port 8983 through a temporary URL on Google's server\n",
"from google.colab import output\n",
"output.serve_kernel_port_as_window(8983)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "a7Jh4F7ScE9i",
"colab_type": "text"
},
"source": [
"# Install Yasa as a package in Solr"
]
},
{
"cell_type": "code",
"metadata": {
"id": "gUzM3oAzr1bT",
"colab_type": "code",
"colab": {}
},
"source": [
"!solr-8.6.0/bin/solr package add-repo yasa \"https://raw.githubusercontent.com/yasa-org/yasa/master/repo/\"\n",
"!solr-8.6.0/bin/solr package install yasa\n",
"!solr-8.6.0/bin/solr package deploy yasa -y -cluster"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "O22fpW5bb08o",
"colab_type": "text"
},
"source": [
"\n",
"# Access the Yasa dashboard"
]
},
{
"cell_type": "code",
"metadata": {
"id": "yhzvDEcscXMr",
"colab_type": "code",
"colab": {}
},
"source": [
"print (\"Click here to access the Yasa dashboard: \"+ output.eval_js(\"google.colab.kernel.proxyPort(8983)\") + \"v2/yasa\")"
],
"execution_count": null,
"outputs": []
}
]
}

0 comments on commit e2d078f

Please sign in to comment.