Skip to content

Commit

Permalink
fix dataset search query
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantsan committed Jul 29, 2024
1 parent df11cae commit 2d850c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ckanext/bulk/entity_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def search_entities_by_filters(
The filters are combined with an AND operator.
"""
q_list = [f'type:"{cls.entity_type}"']
q_list = []

for f in filters:
operator = f["operator"]
Expand All @@ -215,6 +215,7 @@ def search_entities_by_filters(
q_list.append(f"{f['field']}:[* TO *]")

query = f" {global_operator} ".join(q_list)
query = f"type:\"{cls.entity_type}\" AND ({query})"

start = 0
rows = 1000
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ckanext-bulk
version = 0.1.3
version = 0.1.4
description = Bulk update for CKAN datasets/resources
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 2d850c6

Please sign in to comment.