I know that sqlite FTS provides proximity operators with NEAR and I also know
that the querying tokenizer section says you can get a token position
(http://www.sqlite.org/fts3.html#section_8_2).

Although when using the offsets() function in FTS you get the byte position
as opposed to the token position.

I'd like to implement a proximity ranking function that ideally works like
so:

SELECT 
  docID, 
  rank(matchinfo(documents, 'pcxnal'), offsets(documents)) as score 
FROM documents MATCH <query-pattern>
ORDER BY score DESC
LIMIT 10;

or as extra information within matchinfo().

As far as I can tell this information isn't easily accessible through the
API but shouldn't be too much of a stretch to be accessible.

I'm not averse to the idea of writing the code myself so before diving in,
would anyone familiar have any advice or pointers or is there an "intro to
contributing to sqlite" guide I need to read?



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/Proximity-ranking-with-FTS-tp76149.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to