Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About SQLite FTS5 and offsets #1

Closed
edwinyzh opened this issue Mar 26, 2021 · 5 comments
Closed

About SQLite FTS5 and offsets #1

edwinyzh opened this issue Mar 26, 2021 · 5 comments

Comments

@edwinyzh
Copy link

Hello Anton,

Just read your article about SQLite is not a toy database and found that comments were not enabled, and I'm wondering if I can take this chance to ask do you happen to know how to implement the offsets function for FTS5?

Thanks!

@nalgeon
Copy link
Owner

nalgeon commented Mar 26, 2021

Hello Edwin! What's an offsets function, could you give an example?

@edwinyzh
Copy link
Author

Anton,

It's the official offsets functions supported by FTS3/4 but not supported by FTS5.

@nalgeon
Copy link
Owner

nalgeon commented Mar 26, 2021

Quoting from FTS5 docs:

FTS5 has no matchinfo() or offsets() function, and the snippet() function is not as fully-featured as in FTS3/4. However, since FTS5 does provide an API allowing applications to create custom auxiliary functions, any required functionality may be implemented within the application code.

I never worked with custom auxiliary functions, so I've got no idea how to implement offsets() 🤷

@edwinyzh
Copy link
Author

No problem and I'm await your next awesome article on SQLite :)

@nalgeon
Copy link
Owner

nalgeon commented Mar 27, 2021

Thank you very much, Edwin! Will do my best ツ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants