diff --git a/shell/index.sh b/shell/index.sh new file mode 100644 index 000000000..728e95e69 --- /dev/null +++ b/shell/index.sh @@ -0,0 +1,38 @@ +CORE=${1:-test_core} +SKIP_DOWNLOAD=${2:-true} + +echo "" +echo "Beginning index run for core ${CORE}" +echo "-------------------------------------------------------" +echo "" + +if [[ "$SKIP_DOWNLOAD" = false ]]; then + echo "Deleting current CSV files." + rm dicom_derived_all_*.csv + + echo "Downloading new index data." + gsutil cp gs://idc-dev-files/dicom_derived_all_*.csv ./ +else + echo "Skipping download. Files are assumed to be present in the directory." +fi + +echo "" +echo "Deleting and re-creating the core." +sudo -u solr /opt/bitnami/apache-solr/bin/solr delete -c $CORE +sudo -u solr /opt/bitnami/apache-solr/bin/solr create -c $CORE -s 2 -rf 2 + +echo "" +echo "Creating the core schema." +echo '{"add-field":['$(cat core_schema.json)']}' | curl -u idc:$SOLR_PASSWORD -X POST -H 'Content-type:application/json' --data-binary @- https://localhost:8983/solr/$CORE/schema --cacert solr-ssl.pem + +echo "" +echo "Indexing the following files:" +ls -l dicom_derived_all_*.csv + +echo "" +for CSV in $(ls dicom_derived_all_*.csv) +do + echo "Indexing file ${CSV}..." + curl -u idc:$SOLR_PASSWORD -X POST https://localhost:8983/solr/$CORE/update?commit=yes --data-binary @$CSV -H 'Content-type:application/csv' --cacert solr-ssl.pem + echo "...done." +done diff --git a/static/js/image_search.js b/static/js/image_search.js index 088306365..61918fb19 100644 --- a/static/js/image_search.js +++ b/static/js/image_search.js @@ -2258,7 +2258,7 @@ require([ checkBox.indeterminate = false; } - if ( (checked) && (filtnm ==='tcga_clinical')){ + if ( (checked) && (filtnm ==='tcga_clinical') && !is_cohort){ checkTcga(); } @@ -2551,9 +2551,9 @@ require([ _.each(filters, function(group){ _.each(group['filters'], function(filter){ let selector = 'div.list-group-item__body[data-filter-attr-id="'+filter['id']+'"], '+'div.list-group-sub-item__body[data-filter-attr-id="'+filter['id']+'"]'; + $(selector).parents('.collection-list').collapse('show'); $(selector).collapse('show'); $(selector).find('.show-more').triggerHandler('click'); - $(selector).parents('.collection-list').collapse('show'); $(selector).parents('.tab-pane.search-set').length > 0 && $('a[href="#'+$(selector).parents('.tab-pane.search-set')[0].id + '"]').tab('show'); if($(selector).children('.ui-slider').length > 0) { sliders.push({ @@ -2572,7 +2572,6 @@ require([ if(sliders.length > 0) { load_sliders(sliders, false); } - console.debug("Making filter text..."); mkFiltText(); return updateFacetsData(true).promise(); };