Skip to content

Commit

Permalink
-> Fix for #440
Browse files Browse the repository at this point in the history
-> Indexing script, pass #1
  • Loading branch information
s-paquette committed Nov 18, 2020
1 parent 1bbd4d2 commit 65514a0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
38 changes: 38 additions & 0 deletions shell/index.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions static/js/image_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,7 @@ require([
checkBox.indeterminate = false;
}

if ( (checked) && (filtnm ==='tcga_clinical')){
if ( (checked) && (filtnm ==='tcga_clinical') && !is_cohort){
checkTcga();
}

Expand Down Expand Up @@ -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({
Expand All @@ -2572,7 +2572,6 @@ require([
if(sliders.length > 0) {
load_sliders(sliders, false);
}
console.debug("Making filter text...");
mkFiltText();
return updateFacetsData(true).promise();
};
Expand Down

0 comments on commit 65514a0

Please sign in to comment.