Skip to content

Commit a210bd5

Browse files
committed
Fix query field names in SOLR result caching to use correct suffix
1 parent de263d9 commit a210bd5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/vfbquery/solr_result_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def get_cache_stats(self) -> Dict[str, Any]:
442442
# Get documents with VFBquery cache fields
443443
# Use a specific field search since wildcards may not work in all SOLR versions
444444
response = requests.get(f"{self.cache_url}/select", params={
445-
"q": "vfb_query_term_info_str:[* TO *] OR vfb_query_anatomy_str:[* TO *] OR vfb_query_neuron_str:[* TO *]",
445+
"q": "vfb_query_term_info_ss:[* TO *] OR vfb_query_anatomy_ss:[* TO *] OR vfb_query_neuron_ss:[* TO *]",
446446
"fl": "id,vfb_query_*", # Get ID and all VFBquery fields
447447
"rows": "1000", # Process in batches
448448
"wt": "json"
@@ -467,8 +467,8 @@ def get_cache_stats(self) -> Dict[str, Any]:
467467
if field_name.startswith("vfb_query_"):
468468
total_fields += 1
469469

470-
# Extract query type from field name (remove vfb_query_ prefix and _str suffix)
471-
query_type = field_name.replace("vfb_query_", "").replace("_str", "")
470+
# Extract query type from field name (remove vfb_query_ prefix and _ss suffix)
471+
query_type = field_name.replace("vfb_query_", "").replace("_ss", "")
472472
field_stats[query_type] = field_stats.get(query_type, 0) + 1
473473

474474
try:

0 commit comments

Comments
 (0)