Skip to content

Instantly share code, notes, and snippets.

@janhoy
Last active August 4, 2021 17:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janhoy/0f7cddc0d92f9e53db7522fe93ff7003 to your computer and use it in GitHub Desktop.
Save janhoy/0f7cddc0d92f9e53db7522fe93ff7003 to your computer and use it in GitHub Desktop.
How to test YASA with Solr in 3 minutes

How to test YASA with Solr in 3 minutes

  1. Download YASA (https://github.com/kezhenxu94/yasa)
  2. Start Solr through Docker, replacing old UI with YASA
  3. Index some content
  4. Test the UI

Copy/paste the below commands (Mac/Linux) to automate this

wget https://github.com/kezhenxu94/yasa/releases/download/v0.5/yasa-v0.5.tgz
tar -xzf yasa-v0.5.tgz
cd dist
docker run --name yasa --rm -d -ti -p 8983:8983 \
    -v $(pwd)/index.html:/opt/solr/server/solr-webapp/webapp/index.html \
    -v $(pwd)/static:/opt/solr/server/solr-webapp/webapp/static solr:8.3 -c
docker exec yasa solr create -c test1 -n techproducts -rf 2
docker exec yasa post -c test1 example/exampledocs

Now you can visit http://localhost:8983/solr/#/dashboard and browse around the new UI You can create and manage collections, browse ZK and config sets, create new configset, and it has some Kibana-like query/discovery/visualize panels. Under "Dev Tools" you have a request workbench where you can issue json-style queries, e.g.

GET /solr/test1/select
{
    "q": "cat:electronics",
    "rows": 2
}

When done testing, just run docker kill yasa

@kezhenxu94
Copy link

Thanks Jan 😄

@kezhenxu94
Copy link

It would be appreciated if this could go into the YASA docs

@janhoy
Copy link
Author

janhoy commented May 29, 2020

Sure, feel free - it is meant as a quick-start for testing something locally. Note that I chose Solr 8.3 since CFP prevents YASA to run with Solr 8.5 (Solr now sends CFP headers to tighten security).

@kezhenxu94
Copy link

Sure, feel free - it is meant as a quick-start for testing something locally. Note that I chose Solr 8.3 since CFP prevents YASA to run with Solr 8.5 (Solr now sends CFP headers to tighten security).

Cool, and thanks for informing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment