X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsolr.c;h=60df6519531109b785581e0e170e0481d12de1eb;hp=d3e9c114687cd71345c463414b14da900fbeaae4;hb=86dd4bfde2e51c5389135a45d29a98032ca0ac69;hpb=43a39e3fad856932e6f538bb05781d0430c58899 diff --git a/src/solr.c b/src/solr.c index d3e9c11..60df651 100644 --- a/src/solr.c +++ b/src/solr.c @@ -204,13 +204,13 @@ static int yaz_solr_decode_facet_counts(ODR o, xmlNodePtr root, return 0; } -static void yaz_solr_decode_suggestion_values(xmlNodePtr ptr, WRBUF wrbuf) +static void yaz_solr_decode_suggestion_values(xmlNodePtr listPptr, WRBUF wrbuf) { xmlNodePtr node; - for (node = ptr; node; node= node->next) { - if (!strcmp((char*)ptr->name, "lst")) { + for (node = listPptr; node; node= node->next) { + if (!strcmp((char*) node->name, "lst")) { xmlNodePtr child; - for (child = ptr->children; child; child= child->next) { + for (child = node->children; child; child= child->next) { if (match_xml_node_attribute(child, "str", "name", "word")) { wrbuf_puts(wrbuf, ""); extract_text_node(child, wrbuf); @@ -236,10 +236,10 @@ static void yaz_solr_decode_misspelled(xmlNodePtr lstPtr, WRBUF wrbuf) xmlNodePtr node; for (node = lstPtr; node; node= node->next) { - if (strcmp((const char*) node->name, "lst")) { + if (!strcmp((const char*) node->name, "lst")) { const char *misspelled = yaz_element_attribute_value_get(node, "lst", "name"); if (misspelled) { - wrbuf_printf(wrbuf, "", misspelled); + wrbuf_printf(wrbuf, "\n", misspelled); yaz_solr_decode_suggestion_lst(node->children, wrbuf); wrbuf_puts(wrbuf, "\n"); }