diff --git a/flask/cluster.py b/flask/cluster.py index 440d901..a0f752b 100644 --- a/flask/cluster.py +++ b/flask/cluster.py @@ -117,11 +117,13 @@ def update_clusters(): logger_.log('------------ Updating clusters ------------', True) # Re-read config (force a fresh load, not the value cached at import) so a - # flag set at runtime via /config is honored. When skip_clustering is set, - # skip the (very slow) uclust run and keep the clusters from the previous - # run -- update_index will leave the existing clusters_dump untouched. + # flag set at runtime via /config is honored. skip_clustering DEFAULTS TO + # TRUE: the (very slow) uclust run is skipped and the previous clusters are + # reused unless config explicitly sets skip_clustering to false. This lets + # deployments (e.g. Azure) that can't edit config.json avoid the multi-hour + # clustering by default; a frontend can later set it false to force a rerun. config_manager._config = None - if config_manager.load_config().get('skip_clustering'): + if config_manager.load_config().get('skip_clustering', True): logger_.log('******** skip_clustering=true: skipping uclust, reusing previous clusters ********', True) logger_.log('------------ Clustering skipped (previous clusters kept) ------------\n', True) return None diff --git a/flask/config.json b/flask/config.json index 486899c..d1de430 100644 --- a/flask/config.json +++ b/flask/config.json @@ -1 +1 @@ -{"uclust_identity": "0.8", "elasticsearch_index_name": "part", "pagerank_tolerance": "0.0001", "elasticsearch_endpoint": "http://localhost:9200/", "sparql_endpoint": "http://localhost:8890/sparql?", "last_update_start": "2026-06-30T15:42:11.762203", "last_update_end": "none", "distributed_search": false, "which_search": "vsearch", "autoUpdateIndex": false, "updateTimeInDays": "1", "skip_clustering": true} \ No newline at end of file +{"uclust_identity": "0.8", "elasticsearch_index_name": "part", "pagerank_tolerance": "0.0001", "elasticsearch_endpoint": "http://localhost:9200/", "sparql_endpoint": "http://localhost:8890/sparql?", "last_update_start": "2026-06-30T18:45:50.382470", "last_update_end": "2026-06-30T16:47:36.892366", "distributed_search": false, "which_search": "vsearch", "autoUpdateIndex": false, "updateTimeInDays": "1"} \ No newline at end of file