Skip to content

Commit 30e9ba5

Browse files
committed
feat(dev): core code changes;
- Updated delete records to use new schema key. - Added in extra meta for if the returned results came from the search index.
1 parent 9860352 commit 30e9ba5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ckanext/datastore_search/backend/solr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ def delete(self,
720720
return
721721

722722
for record in data_dict.get('deleted_records', []):
723+
# FIXME: deleted_records return now has a hard limit in Core code...
723724
errmsg = _('Could not delete DataStore record _id=%s in SOLR core %s') % \
724725
(record['_id'], core_name)
725726
try:

ckanext/datastore_search/logic/action.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def datastore_upsert(up_func: Action,
108108
def datastore_delete(up_func: Action,
109109
context: Context,
110110
data_dict: DataDict) -> ChainedAction:
111-
data_dict['include_records'] = True
111+
data_dict['include_deleted_records'] = True
112112
backend = DatastoreSearchBackend.get_active_backend()
113113
func_result = up_func(context, data_dict)
114114
try:
@@ -150,6 +150,7 @@ def datastore_search(up_func: Action,
150150
records = []
151151
try:
152152
records = backend.search(dict(data_dict, fl=fl))
153+
ds_meta['from_search_index'] = True
153154
except DatastoreSearchException:
154155
if not backend.only_use_engine:
155156
# fallback to database query

0 commit comments

Comments
 (0)