projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9274947
)
re-impl. status check
author
Dennis Schafroth
<dennis@indexdata.com>
Thu, 26 Aug 2010 13:23:59 +0000
(15:23 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Thu, 26 Aug 2010 13:23:59 +0000
(15:23 +0200)
src/solr.c
patch
|
blob
|
history
diff --git
a/src/solr.c
b/src/solr.c
index
51f3074
..
7a13940
100644
(file)
--- a/
src/solr.c
+++ b/
src/solr.c
@@
-202,19
+202,18
@@
int yaz_solr_decode_response(ODR o, Z_HTTP_Response *hres, Z_SRW_PDU **pdup)
}
else
{
}
else
{
- /** look for result node */
+ /** look for result (required) and facets node (optional) */
+ int rc_result = -1;
+ int rc_facets = 0;
for (ptr = root->children; ptr; ptr = ptr->next)
{
if (ptr->type == XML_ELEMENT_NODE &&
!strcmp((const char *) ptr->name, "result"))
for (ptr = root->children; ptr; ptr = ptr->next)
{
if (ptr->type == XML_ELEMENT_NODE &&
!strcmp((const char *) ptr->name, "result"))
- yaz_solr_decode_result(o, ptr, sr);
+ rc_result = yaz_solr_decode_result(o, ptr, sr);
if (match_xml_node_attribute(ptr, "lst", "name", "facet_counts"))
if (match_xml_node_attribute(ptr, "lst", "name", "facet_counts"))
- yaz_solr_decode_facet_counts(o, ptr, sr);
- }
- if (!ptr)
- {
- ret = -1;
+ rc_facets = yaz_solr_decode_facet_counts(o, ptr, sr);
}
}
+ ret = rc_result + rc_facets;
}
}
if (doc)
}
}
if (doc)