69f305ec87e4f216380216bbf79badba8ce0b90e,search/management/commands/reindex_solr.py,Command,handle,#Command#,42

Before Change



        // Get all sounds that should not be in solr and remove them if they are
        sound_qs = Sound.objects.exclude(processing_state="OK", moderation_state="OK")
        for sound in sound_qs:
            delete_sound_from_solr(sound.id)  // Will only do something if sound in fact exists in solr

After Change



        // Delete all sounds in solr which are not found in the Freesound DB
        solr_ids = get_all_sound_ids_from_solr()
        indexed_sound_ids = sounds_to_index.values_list("id", flat=True)
        sound_ids_to_delete = list(set(solr_ids).difference(indexed_sound_ids))
        console_logger.info("Deleting %d non-existing sounds form solr", len(sound_ids_to_delete))
        delete_sounds_from_solr(sound_ids=sound_ids_to_delete)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: MTG/freesound
Commit Name: 69f305ec87e4f216380216bbf79badba8ce0b90e
Time: 2019-02-20
Author: frederic.font@upf.edu
File Name: search/management/commands/reindex_solr.py
Class Name: Command
Method Name: handle


Project Name: AlexsLemonade/refinebio
Commit Name: 58244cbd1c25d116e1d19424d7c49ff28c5e41b8
Time: 2020-08-11
Author: willvauclain.dev@gmail.com
File Name: common/data_refinery_common/models/experiment.py
Class Name: Experiment
Method Name: get_sample_metadata_fields


Project Name: AlexsLemonade/refinebio
Commit Name: 99d2d1aced54a9673b9e25b6c1f992acd20535e1
Time: 2019-08-16
Author: arielsvn@gmail.com
File Name: common/data_refinery_common/rna_seq.py
Class Name:
Method Name: get_quant_results_for_experiment