sqlite-okapi-bm25 icon indicating copy to clipboard operation
sqlite-okapi-bm25 copied to clipboard

Wrong index in `x` info table

Open wqweto opened this issue 10 years ago • 1 comments

Line 33 is currently int currentX = X_OFFSET + (3 * searchTextCol * (i + 1)); should become int currentX = X_OFFSET + (3 * (searchTextCol + i * colCount)); or similar.

Here is a sinppet from sqlite docs for matchinfo

          hits_this_row  = array[3 * (c + p*cols) + 0]
          hits_all_rows  = array[3 * (c + p*cols) + 1]
          docs_with_hits = array[3 * (c + p*cols) + 2]

where column idx c is searchTextCol, phrase idx p is i and number of cols cols is colCount

wqweto avatar May 23 '14 09:05 wqweto

+1. currentX is calculated wrongly. It should be modified as wqweto are saying.

wataradio avatar Jul 11 '15 12:07 wataradio