Added relevance to return rec
authorSebastian Hammer <quinn@indexdata.com>
Wed, 7 Oct 2009 14:07:49 +0000 (14:07 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Wed, 7 Oct 2009 14:07:49 +0000 (14:07 +0000)
src/http_command.c

index a149e50..6c68ae4 100644 (file)
@@ -777,6 +777,8 @@ static void show_records(struct http_channel *c, int active)
             write_subrecord(p, c->wrbuf, service, 0); // subrecs w/o details
         if (ccount > 1)
             wrbuf_printf(c->wrbuf, "<count>%d</count>\n", ccount);
+       if (strstr(sort, "relevance"))
+           wrbuf_printf(c->wrbuf, "<relevance>%d</relevance>\n", rec->relevance);
         wrbuf_puts(c->wrbuf, "<recid>");
         wrbuf_xmlputs(c->wrbuf, rec->recid);
         wrbuf_puts(c->wrbuf, "</recid>\n");