Even if I use the stock example from the web page, with only 2 columns, and the exact schema from the example, I get the same result.
I'm wondering if it is a bug in the example code on the website (ie the source code has moved on, invalidating an example based on old code), or it's just something in turning their c code example into a full extension that I didn't do right. From the extension's source code: nCol = aMatchinfo[1]; if( nVal!=(*1+nCol*) ) goto wrong_number_args; So, it should scale with the number of columns. (I would hope it's not hardcoded to a set number of columns!) -------- Original Message -------- Subject: Re: [sqlite] FTS4 code from the website From: Dan Kennedy <danielk1...@gmail.com> Date: 6/29/2011 11:25 PM > On 06/30/2011 10:31 AM, Ryan Henrie wrote: >> Reference Page: http://www.sqlite.org/fts3.html#appendix_a >> >> At the bottom of the page, there is a sample c file to calculate the >> rank, and a FTS query to use it. I can't get it to work. >> >> You can see my files here: >> >> http://coldmist.homeip.net/quotes_sql_test.txt >> http://coldmist.homeip.net/rank.c.txt >> >> > gcc -shared -fPIC -I/opt/include -o rank.so rank.c >> > rm test.sql; sqlite3 test.sql<quotes_sql_test.txt >> >> The C file compiles without errors or warnings on my x86 Linux machine >> (and I verified one plugin I found compiled and worked fine, just to >> remove build issues as a cause), but when I execute the import, it >> complains with this: >> >> Error: near line 16: wrong number of arguments to function myrank() > Looks like myrank() is supposed to be passed 5 arguments in this > case. The return value of matchinfo() and a weight for each column. > Your table has 4 columns, hence 5 arguments. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users