Remove comments about recordPosition in ZOOM
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 30 May 2012 07:51:18 +0000 (09:51 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 30 May 2012 07:51:18 +0000 (09:51 +0200)
src/solr.c
src/zoom-sru.c

index de46b5f..475f615 100644 (file)
@@ -90,8 +90,6 @@ static void yaz_solr_decode_result_docs(ODR o, xmlNodePtr ptr,
             record->recordData_buf = odr_malloc(o, buf->use + 1);
             memcpy(record->recordData_buf, buf->content, buf->use);
             record->recordData_buf[buf->use] = '\0';
-            // TODO Solve the real problem in zoom-sru, that doesnt work with 0-based indexes.
-            // Work-around: Making the recordPosition 1-based.
             record->recordPosition = odr_intdup(o, start + offset + 1);
 
             xmlBufferFree(buf);
index d7f19cb..c38cee6 100644 (file)
@@ -320,10 +320,8 @@ static zoom_ret handle_srw_response(ZOOM_connection c,
             
             Z_NamePlusRecord *npr = (Z_NamePlusRecord *)
                 odr_malloc(c->odr_in, sizeof(Z_NamePlusRecord));
-            /*
-             * TODO This does not work with 0-based recordPositions.
-             * We will iterate over one twice
-             */
+
+            /* recordPosition is 1 based */
             if (res->records[i].recordPosition && 
                 *res->records[i].recordPosition > 0)
                 pos = *res->records[i].recordPosition - 1;