diff --git a/.gitignore b/.gitignore index d87cec2..51b1cbe 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ volumes/solr* solr/configsets/ecommerce.zip solr/data/*.json solr/data/*.gz -rre/target .idea *.iml __pycache__ diff --git a/README.md b/README.md index 982f495..e5626e5 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,6 @@ We host a complete demonstration environment online for you to play with, see li * Solr runs at http://localhost:8983 | http://chorus.dev.o19s.com:8983 * SMUI runs at http://localhost:9000 | http://chorus.dev.o19s.com:9000 * Quepid runs at http://localhost:3000 | http://chorus.dev.o19s.com:3000 -* RRE runs at http://localhost:7979 | http://chorus.dev.o19s.com:7979 * Keycloak runs at http://keycloak:9080 | http://chorus.dev.o19s.com:9080 * Prometheus runs at http://localhost:9090 | http://chorus.dev.o19s.com:9090 * Grafana runs at http://localhost:9091 | http://chorus.dev.o19s.com:9091 diff --git a/TECHNICAL_DETAILS.md b/TECHNICAL_DETAILS.md index 98b22f7..af84938 100644 --- a/TECHNICAL_DETAILS.md +++ b/TECHNICAL_DETAILS.md @@ -12,7 +12,7 @@ | MySQL | root | password | docker-compose.yml | -`blockUnknown` is false as we want to let RRE run against the `ecommerce` collection. We have locked down in `security.json` to allow anonymous users only to hit the /ecommerce/select/ end point +`blockUnknown` is false as we want to let RRE (now removed from Chorus) run against the `ecommerce` collection. We have locked down in `security.json` to allow anonymous users only to hit the /ecommerce/select/ end point When you bring up Solr Admin and then are redirected to Keycloak, when you register and sent back to Solr you are given the `solr-admin` role. @@ -48,13 +48,6 @@ docker-compose run quepid thor user:create -a demo@example.com "Demo User" passw For Quepid case, pick `name` for title, and `id` for identifier. Add `thumb:imageUrl` to the list of fields. -## Setting up RRE - -```sh -docker-compose run rre mvn rre:evaluate -docker-compose run rre mvn rre-report:report -``` - ## Monitoring Details Prometheus and Grafana setup heavily inspired by https://github.com/vegasbrianc/prometheus and https://github.com/chatman/solr-grafana-docker diff --git a/docker-compose.yml b/docker-compose.yml index 780c276..e4a1c90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: mysql: container_name: mysql - image: amd64/mysql:5.7.40 + image: mysql:8.3.0 ports: - 3306:3306 environment: @@ -173,7 +173,7 @@ services: quepid: container_name: quepid - image: o19s/quepid:6.14.0 + image: o19s/quepid:7.15.1 ports: - 3000:3000 command: "foreman s -f Procfile" @@ -205,22 +205,6 @@ services: - mysql - redis - rre: - container_name: rre - build: - context: ./rre - dockerfile: Dockerfile - volumes: - - ./rre:/rre - ports: - - "7979:8080" - command: "java -jar rre-server-1.1.jar" - environment: - - SOLR_URL=http://solr1:8983/solr/ecommerce - depends_on: - - solr1 - - embeddings: container_name: embeddings build: diff --git a/katas/000_setting_up_chorus.md b/katas/000_setting_up_chorus.md index 90f9459..f3bf513 100644 --- a/katas/000_setting_up_chorus.md +++ b/katas/000_setting_up_chorus.md @@ -152,23 +152,8 @@ Visit Quepid at http://localhost:3000 and log in with the email and password you Go through the initial case setup process. Quepid will walk you through setting up a `Movie Cases` case via a Wizard interface, and then show you some of the key features of Quepid's UI. I know you want to skip the tour of Quepid interface, however there is a lot of interactivity in the UI, so it's worth going through the tutorial to get acquainted! -Now we are ready to confirm our second Offline Testing tool, Rated Ranking Evaluator, commonly called RRE, is ready to go. Unlike Quepid, which is a webapp, RRE is a set of command line tools that run tests, and then publishes the results in both a Excel spreadsheet format and a web dashboard. - -Now, lets confirm that you can run the RRE command line tool. Go ahead and run a regression: - -```sh -docker-compose run rre mvn rre:evaluate -``` - -You should see some output, and you should see the output saved to `./rre/target/rre/evaluation.json` in your local directory. We've wrapped RRE inside of the Docker container, so you can edit the RRE configurations locally, but run RRE in the container. - Now, let's go ahead and make sure we publish the results of our evaluation: -```sh -docker-compose run rre mvn rre-report:report -``` - -You can now see a html page saved to `./rre/target/site/rre-report.html`. Bring up http://localhost:7979 and you will see a relatively unexciting empty dashboard. Don't worry, in our first kata, we'll do a relevancy test and fill this dashboard in. diff --git a/katas/001_optimize_a_query.md b/katas/001_optimize_a_query.md index c4fdafc..9ecd524 100644 --- a/katas/001_optimize_a_query.md +++ b/katas/001_optimize_a_query.md @@ -90,32 +90,6 @@ Notice that our results have now turned green across the board from red? Our gr There is a lot to unpack in here that is beyond the scope of this kata. However bear with me. -So now we feel like this is good results. However, while we've just tuned these notebook examples, what has the impact of the Querqy rule changes been on potentially other queries? Quepid is great for up to 60 or so queries per case, but it doesn't handle 100's or 1000's of queries well. Plus, we only get one search metric, in our case NDCG at a time. What if I want to calculate all the search metrics. For that, enter RRE. - -RRE uses it's own format of ratings, so in Quepid, click the `Export` option in the toolbar. This will pop up a modal box, and choose the `Rated Ranking Evaluator` option. Then click `Export` and save this file on your desktop. - -You then need to put this ratings into RRE. First move any ratings file in `./rre/src/etc/ratings/` out of that directory, leaving them in `./rre` is fine. Then take your freshly exported `Notebook_Computers_rre.json` file and put it in the `ratings` directory. - -Now, lets look at the RRE setup. We want to regression test our pre Querqy algorithm and our post Querqy algorithm. So look at the template files in `./rre/src/etc/templates`. As you can see `v1.0` is just the simplistic query. However `v1.1` is using the Querqy enabled request handler. This is going to let us measure the two against each other. - -While in this kata we are only running the same set of queries as in Quepid, in real life you would be regression testing those two queries against 100's of other rated queries as well. - -So let's go run our evaluation! We're back on the command line: - -```sh -docker-compose run rre mvn rre:evaluate -``` - -Look for a message about `completed all 2 evaluations` to know that it's running properly. - -And once that completes, lets go ahead and publish the reports: - -```sh -docker-compose run rre mvn rre-report:report -``` - -You have two ways of looking at the results of RRE running. There is an Excel spreadsheet you can look at, or you can use the online Dashboard available at http://localhost:7979. - -Going into what all the metrics that RRE provides, and this is just a small sample set, is beyond this. Suffice to say, if you look at the NDCG@4 and NDCG@10, you will see that we had a big jump from the terrible results of v1.0 to the amazing results in v1.1! +So now we feel like this is good results. However, while we've just tuned these notebook examples, what has the impact of the Querqy rule changes been on potentially other queries? Quepid is great for up to 60 or so queries per case, but it doesn't handle 100's or 1000's of queries well. Plus, we only get one search metric, in our case NDCG at a time. That all folks! You've successfully taken a bad 'notebook' query, assessed it to put a numerical value on the quality of the search, and then improved it using some rules to rewrite the query. You then remeasured, saw the quantitative improvement, and then ran a simulated regression test of those queries (and all your other ones in the real world), and have meaningfully improved search quality, which drives more revenue! diff --git a/quickstart.sh b/quickstart.sh index 216ab64..1ccc214 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -54,9 +54,6 @@ done # Function check_prerequisites makes sure that you have curl, jq, docker-compose, and zip installed. See helpers.sh for details. check_prerequisites -services="blacklight solr1 solr2 solr3 keycloak smui" - - services="blacklight solr1 solr2 solr3 keycloak" if $observability; then @@ -68,7 +65,7 @@ else fi if $offline_lab; then - services="${services} quepid rre" + services="${services} quepid" fi if $vector_search; then @@ -81,9 +78,7 @@ if $vector_search; then fi fi -if $active_search_management; then - services="${services} smui" -fi + if ! $local_deploy; then echo -e "${MAJOR}Updating configuration files for online deploy${RESET}" @@ -101,6 +96,15 @@ if $shutdown; then exit fi +if $active_search_management; then + # need to start MySQL and verify it is up and running before starting SMUI. + #log_major "Starting MySQL first to ensure fully available prior to starting SMUI." + docker compose up -d mysql + ./mysql/wait-for-mysql.sh + services="${services} smui" + +fi + docker-compose up -d --build ${services} echo -e "${MAJOR}Waiting for Solr cluster to start up and all three nodes to be online.${RESET}" @@ -123,7 +127,7 @@ docker exec solr1 solr zk cp /security.json zk:security.json -z zoo1:2181 log_minor "waiting for security.json to be available to all Solr nodes" ./solr/wait-for-zk-200.sh -echo -e "${MAJOR}Packaging ecommerce configset.${RESET}" +log_major "Packaging ecommerce configset." (cd solr/configsets/ecommerce/conf && zip -r - *) > ./solr/configsets/ecommerce.zip log_minor "posting ecommerce.zip configset" curl --user solr:SolrRocks -X PUT --header "Content-Type:application/octet-stream" --data-binary @./solr/configsets/ecommerce.zip "http://localhost:8983/api/cluster/configs/ecommerce" @@ -209,7 +213,7 @@ if $vector_search; then fi -echo -e "${MAJOR}Defining relevancy algorithms using ParamSets.${RESET}" +log_major "Defining relevancy algorithms using ParamSets." curl --user solr:SolrRocks -X POST http://localhost:8983/solr/ecommerce/config/params -H 'Content-type:application/json' -d '{ "set": { "visible_products":{ @@ -385,7 +389,7 @@ fi if $active_search_management; then - echo -e "${MAJOR}Setting up SMUI${RESET}" + log_major "Setting up SMUI" SOLR_INDEX_ID=`curl -S -X PUT -H "Content-Type: application/json" -d '{"name":"ecommerce", "description":"Chorus Webshop"}' http://localhost:9000/api/v1/solr-index | jq -r .returnId` curl -S -X PUT -H "Content-Type: application/json" -d '{"name":"product_type"}' http://localhost:9000/api/v1/${SOLR_INDEX_ID}/suggested-solr-field curl -S -X PUT -H "Content-Type: application/json" -d '{"name":"title"}' http://localhost:9000/api/v1/${SOLR_INDEX_ID}/suggested-solr-field @@ -396,27 +400,23 @@ if $offline_lab; then log_major "Setting up Quepid" ./mysql/wait-for-mysql.sh - docker-compose run --rm quepid bin/rake db:setup - docker-compose run quepid thor user:create -a admin@choruselectronics.com "Chorus Admin" password + docker-compose run --rm quepid bundle exec bin/rake db:setup + docker-compose run quepid bundle exec thor user:create -a admin@choruselectronics.com "Chorus Admin" password log_minor "Setting up Chorus Baseline Relevance case" if $local_deploy; then solr_collection_url=http://localhost:8983/solr/ecommerce/select else solr_collection_url=http://chorus.dev.o19s.com:8983/solr/ecommerce/select fi - docker-compose run quepid thor case:create "Chorus Baseline Relevance" solr ${solr_collection_url} JSONP "id:id, title:title, thumb:img_500x500, name, brand, product_type" "q=#\$query##&useParams=visible_products,querqy_algo" nDCG@10 admin@choruselectronics.com + docker-compose run quepid bundle exec thor case:create "Chorus Baseline Relevance" solr ${solr_collection_url} JSONP "id:id, title:title, thumb:img_500x500, name, brand, product_type" "q=#\$query##&useParams=visible_products,querqy_algo" nDCG@10 admin@choruselectronics.com docker cp ./katas/Broad_Query_Set_rated.csv quepid:/srv/app/Broad_Query_Set_rated.csv - docker exec quepid thor ratings:import 1 /srv/app/Broad_Query_Set_rated.csv >> /dev/null - + docker exec quepid bundle exec thor ratings:import 1 /srv/app/Broad_Query_Set_rated.csv >> /dev/null - log_major "Setting up RRE" - docker-compose run rre mvn rre:evaluate - docker-compose run rre mvn rre-report:report fi if $observability; then - echo -e "${MAJOR}Setting up Grafana${RESET}" + log_major "Setting up Grafana" curl -u admin:password -S -X POST -H "Content-Type: application/json" -d '{"email":"admin@choruselectronics.com", "name":"Chorus Admin", "role":"admin", "login":"admin@choruselectronics.com", "password":"password", "theme":"light"}' http://localhost:9091/api/admin/users curl -u admin:password -S -X PUT -H "Content-Type: application/json" -d '{"isGrafanaAdmin": true}' http://localhost:9091/api/admin/users/2/permissions curl -u admin:password -S -X POST -H "Content-Type: application/json" http://localhost:9091/api/users/2/using/1 diff --git a/rre/Dockerfile b/rre/Dockerfile deleted file mode 100644 index 5a82acc..0000000 --- a/rre/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM maven:3-eclipse-temurin-11 - -ENV MAVEN_OPTS="-Xms1024M -Xmx2048M -XX:MaxMetaspaceSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" - -RUN mkdir /rre - -WORKDIR /rre - -COPY rre-server-1.1.jar /rre/ -COPY src /rre/src -COPY pom.xml /rre/ - -# Lets install the RRE plugin dependencies locally. -RUN mvn -B dependency:resolve-plugins dependency:resolve clean package -DincludeScope=runtime - -EXPOSE 8080 diff --git a/rre/pom.xml b/rre/pom.xml deleted file mode 100644 index 88f2297..0000000 --- a/rre/pom.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - 4.0.0 - org.querqy.chorus - chorus-rre-regression - 1.0 - pom - - 1.8 - 1.8 - - - - sease - https://raw.github.com/SeaseLtd/rated-ranking-evaluator/mvn-repo - - - - - - io.sease - rre-maven-external-solr-plugin - 8.3.0 - - - src/etc/configuration_sets - src/etc/ratings - src/etc/templates - id,title,score - - - - - - - - - - io.sease.rre.core.domain.metrics.impl.PrecisionAtTen - - - - io.sease.rre.core.domain.metrics.impl.NDCGAtK - 4 - - 4 - 2 - - NDCG@4 - - - io.sease.rre.core.domain.metrics.impl.NDCGAtK - 8 - - 4 - 2 - - NDCG@8 - - - io.sease.rre.core.domain.metrics.impl.NDCGAtK - 10 - - 4 - 2 - - NDCG@10 - - - - true - false - 4 - - - - - search-quality-evaluation - package - - evaluate - - - - - - io.sease - rre-maven-report-plugin - 1.1 - - - spreadsheet - rre-server - - http://rre:8080 - - - - search-quality-evaluation-reporting - package - - report - - - - - - - diff --git a/rre/rre-server-1.1.jar b/rre/rre-server-1.1.jar deleted file mode 100644 index c622fbc..0000000 Binary files a/rre/rre-server-1.1.jar and /dev/null differ diff --git a/rre/src/etc/configuration_sets/README.md b/rre/src/etc/configuration_sets/README.md deleted file mode 100644 index 95cd481..0000000 --- a/rre/src/etc/configuration_sets/README.md +++ /dev/null @@ -1,24 +0,0 @@ -This folder contains one subfolder for each configuration version. -Each version folder should contain a solr-settings.json file with details of -how to connect to the appropriate Solr core. - -This is an example: - -* configuration_sets - * v1.0 - * solr-settings.json - * v1.1 - * solr-settings.json - -The solr-settings.json files may have the following properties: - -- `baseUrls`: an array of Solr base URLs (eg. `[ "http://localhost:8983/solr", "http://localhost:7574/solr" ]`). -- `collectionName` [**REQUIRED**]: the name of the collection or core being evaluated. -- `zkHosts`: an array of Zookeeper hosts (eg. `[ "zk1:2181", "zk2:2181" ]`). -- `zkChroot`: the path to the root Zookeeper node containing Solr data, if running in a Chroot environment (eg. `"/solr"`). -Optional. -- `connectionTimeoutMillis`: the number of milliseconds to wait for a connection to be made to Solr. Optional. -- `socketTimeoutMillis`: the number of milliseconds to allow for a response from Solr. Optional. - -**Either** the baseUrls **or** the zkHosts property must contain values. If both are empty, -the configuration will fail to load. \ No newline at end of file diff --git a/rre/src/etc/configuration_sets/v1.0/solr-settings.json b/rre/src/etc/configuration_sets/v1.0/solr-settings.json deleted file mode 100644 index e24c5e2..0000000 --- a/rre/src/etc/configuration_sets/v1.0/solr-settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "baseUrls": [ "http://solr1:8983/solr" ], - "collectionName": "ecommerce" -} diff --git a/rre/src/etc/configuration_sets/v1.1-querqy/solr-settings.json b/rre/src/etc/configuration_sets/v1.1-querqy/solr-settings.json deleted file mode 100644 index e24c5e2..0000000 --- a/rre/src/etc/configuration_sets/v1.1-querqy/solr-settings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "baseUrls": [ "http://solr1:8983/solr" ], - "collectionName": "ecommerce" -} diff --git a/rre/src/etc/ratings/README.md b/rre/src/etc/ratings/README.md deleted file mode 100644 index 6eb8be1..0000000 --- a/rre/src/etc/ratings/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Under the ratings folder you should have at least 1 ratings file. -A ratings file is connected with a dataset and contains a set of queries that compose the evaluation execution. \ No newline at end of file diff --git a/rre/src/etc/ratings/chorus_demo_rre.json b/rre/src/etc/ratings/chorus_demo_rre.json deleted file mode 100644 index a05be6b..0000000 --- a/rre/src/etc/ratings/chorus_demo_rre.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - "id_field": "id", - "index": "ecommerce", - "template": "template.json", - "queries": [ - { - "placeholders": { - "$query": "notebook" - }, - "relevant_documents": { - "1": [ - "1325549", - "1667816", - "796872", - "1263537", - "1768011", - "1768010", - "1263523", - "16497", - "2274096", - "9227", - "639328", - "268603", - "918795", - "887471", - "1643541", - "129825", - "1113175", - "1277283", - "1277282", - "3695987", - "79185206", - "79186243", - "78280616", - "78280602", - "79181869", - "79182031", - "79183511", - "79182519", - "78282529", - "79182533", - "79183567", - "78280499", - "79186345", - "79184584", - "78280488", - "79182084", - "78280503", - "78280513", - "78280528", - "3706373", - "3706383", - "65941", - "363859", - "281080", - "904541", - "4204982", - "3917150", - "4204985", - "4204986", - "120239", - "1178511", - "4204999", - "2977883", - "2684109", - "1681635", - "3718468", - "2274095" - ], - "3": [ - "1776827", - "3149703", - "269502", - "3930688", - "4143583", - "3663075", - "3597998", - "1971322", - "78497573", - "3597997", - "78268143", - "79177494", - "77379807", - "78808071", - "78464244", - "79163387", - "78800439", - "79041126", - "78687167", - "77455608", - "555832", - "79163393", - "77947685", - "79171797", - "79447978", - "77220972", - "79039710", - "77949125", - "79163378", - "78801900", - "77368739", - "77339576", - "77367344", - "78655948", - "79354222", - "78667722", - "77368711", - "79449982", - "78126531", - "3786586", - "77368705", - "77668280", - "79163350", - "3706386", - "79252135", - "78667050", - "77194923", - "77483702", - "77943811", - "77380722", - "3956688", - "504699", - "2936377", - "4016904", - "4564489", - "3401422", - "3521053", - "3890698", - "3400359", - "3890710", - "797579", - "3802249", - "4706211", - "1712804", - "3956675", - "78495777", - "3465074", - "77165372", - "78400170", - "77640748", - "1893702", - "4564776", - "3334324", - "78534906", - "1350917", - "77386176", - "78805118", - "78538532" - ] - } - }, - { - "placeholders": { - "$query": "laptop" - }, - "relevant_documents": { - "1": [ - "77858795", - "77858796", - "2368581", - "4143479", - "4143572", - "1768024", - "1766562", - "1768012", - "3797265", - "1679564", - "3706373", - "3706383", - "65941", - "363859", - "281080", - "904541", - "4204986", - "4204985", - "4204982", - "3917150", - "4011117", - "1418538", - "78847062", - "78847065", - "2500960", - "1229074", - "1229111", - "2273010", - "1739387", - "3186555", - "3753984", - "2060449", - "3429328", - "1229110", - "3429350", - "3429347", - "477805", - "541839", - "3429348", - "541814", - "2060476", - "3429345", - "3429325", - "3429324", - "102475", - "1599521", - "3429330", - "77311839", - "77026839", - "3762558", - "77311847", - "77026550", - "77311846", - "1229109" - ], - "3": [ - "797579", - "3802249", - "4706211", - "1712804", - "3956675", - "78495777", - "3465074", - "77165372", - "78400170", - "77640748", - "1893702", - "4564776", - "3334324", - "78534906", - "1350917", - "77386176", - "78805118", - "78538532" - ] - } - } - ] -} diff --git a/rre/src/etc/templates/README.md b/rre/src/etc/templates/README.md deleted file mode 100644 index f9c8f99..0000000 --- a/rre/src/etc/templates/README.md +++ /dev/null @@ -1,12 +0,0 @@ -This folder will contain the query templates associated with the evaluation suite. -A template is a JSON file containing a JSON object with name->value(s) pairs corresponding to query parameters. -Although it is completely ok to have statically-defined values here, usually you will be using placeholders. - -```javascript - { - "searchTerm": "$query", - "categoryId": "$categoryId" - } -``` - -The placeholders values will be defined within the ratings file, specifically in the queries definitions. \ No newline at end of file diff --git a/rre/src/etc/templates/v1.0/template.json b/rre/src/etc/templates/v1.0/template.json deleted file mode 100644 index 3bdf8ed..0000000 --- a/rre/src/etc/templates/v1.0/template.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "q": "$query", - "template_version": "v1.0" -} diff --git a/rre/src/etc/templates/v1.1-querqy/template.json b/rre/src/etc/templates/v1.1-querqy/template.json deleted file mode 100644 index 07d8049..0000000 --- a/rre/src/etc/templates/v1.1-querqy/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "q": "$query", - "useParams": "querqy_algo", - "querqy.rewriters": "replace,common_rules" - "template_version": "v1.1-querqy" -} diff --git a/smui/3.sql b/smui/3.sql new file mode 100644 index 0000000..ee55a47 --- /dev/null +++ b/smui/3.sql @@ -0,0 +1,37 @@ +# --- !Ups + +-- Add tag table. +-- Tags can be assigned to a single solr index or they can be global to all solr indexes (solr_index_id = null). +-- Exported tags must have a property (e.g. "tenant") and a value (e.g. "MO") so that the full tag would be "tenant:MO". +-- Tags that are not exported can have a value only without a property. +-- +-- exported: 1 = is exported to querqy +-- 0 = is not exported to querqy and only used for tagging purposes in SMUI itself +create table input_tag ( + id varchar(36) not null primary key, + solr_index_id varchar(36), + property varchar(1000), + tag_value varchar(1000) not null, + exported int not null, + predefined int not null, + last_update timestamp not null +); + +create unique index input_tag_property_value_index on input_tag (solr_index_id, property (100), tag_value (100)); +create index input_tag_predefined_index on input_tag (predefined); + +-- Add table tag_2_input + +create table tag_2_input ( + tag_id varchar(36) not null, + input_id varchar(36) not null, + last_update timestamp not null, + primary key (tag_id, input_id) +); + +create index tag_2_input_input_id_index on tag_2_input (input_id); + +# --- !Downs + +drop table input_tag; +drop table tag_2_input; diff --git a/smui/8.sql b/smui/8.sql new file mode 100644 index 0000000..119f2b8 --- /dev/null +++ b/smui/8.sql @@ -0,0 +1,14 @@ +# --- !Ups + +-- Ensure that we do not allow duplicate solr indexes with same name. +create unique index solr_index_field_name on solr_index (name (500)); + +-- Ensure that we do not allow duplicate suggested solr fields for the same solr index. +create unique index suggested_solr_field_name_solr_index on suggested_solr_field (solr_index_id, name (500)); + + + +# --- !Downs + +drop index solr_index_field_name +drop index suggested_solr_field_name_solr_index; diff --git a/smui/Dockerfile b/smui/Dockerfile index f6f367d..2eb14d3 100644 --- a/smui/Dockerfile +++ b/smui/Dockerfile @@ -2,6 +2,10 @@ FROM querqy/smui:4.0.11 COPY --chown=smui:smui conf/* conf/ +# This is a workaround for now. Remove when SMUI 5.x is released. +COPY --chown=smui:smui 3.sql conf/evolutions/default/3.sql +COPY --chown=smui:smui 8.sql conf/evolutions/default/8.sql + USER root RUN chmod +x conf/smui2*.sh RUN apt-get update -y && apt-get install -y python3 python3-pip