From ba45bd82e84e9a83e0e3a09d879bbee62cd22e38 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Aug 2013 09:49:59 +0200 Subject: [PATCH] ZOOM: mark record cache with schema as requested rather than the one returned in record structure. The problem is that schema returned by SRU/Solr server may not be present.. So best assumption is to assume schema as requested. This should fix YAZ-675 . --- src/zoom-sru.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/zoom-sru.c b/src/zoom-sru.c index b997eeb..b829738 100644 --- a/src/zoom-sru.c +++ b/src/zoom-sru.c @@ -247,7 +247,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, NMEM nmem; ZOOM_Event event; int *start, *count; - const char *syntax, *elementSetName; + const char *syntax, *elementSetName, *schema; if (!c->tasks) return zoom_complete; @@ -260,7 +260,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, count = &c->tasks->u.search.count; syntax = c->tasks->u.search.syntax; elementSetName = c->tasks->u.search.elementSetName; - + schema = c->tasks->u.search.schema; /* Required not for reporting client hit count multiple times into session */ if (!c->tasks->u.search.recv_search_fired) { yaz_log(YLOG_DEBUG, "posting ZOOM_EVENT_RECV_SEARCH"); @@ -277,6 +277,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, count = &c->tasks->u.retrieve.count; syntax = c->tasks->u.retrieve.syntax; elementSetName = c->tasks->u.retrieve.elementSetName; + schema = c->tasks->u.retrieve.schema; break; default: return zoom_complete; @@ -346,7 +347,7 @@ static zoom_ret handle_srw_response(ZOOM_connection c, resultset->odr); } ZOOM_record_cache_add(resultset, npr, pos, syntax, elementSetName, - sru_rec->recordSchema, diag); + schema, diag); } *count -= i; *start += i; -- 1.7.10.4